Skip to main content

Register or Unregister Tag Push (SetTag/DeleteTag)

[Player Network SDK & MSDK] The game can set tags for users, such as gender, age, education, hobbies, etc. The SDK also has preset default tags, and push notifications can be targeted according to different tags.

Sending tag push messages is the same as sending push messages; the only difference is that when adding a push message, the audience scope must be set to personalized push.

caution

When setting tags, note that ** tags must not contain spaces**.

Supported Platforms

Supports Android, iOS platform.

Function Definition

// Register tag
void SetTag(string channel, string tag);

// Unregister tag
public static void DeleteTag(string channel, string tag);

Input Parameters

ParametersTypeDescription
channelstringChannel definition
e.g., "Firebase"
tagstringTag
Cannot be null or contain spaces

Callback Handling

The callback handling interface is GUAPushBaseResultObserver.The callback data structure is GUABaseResult.

The callback event is PushBaseResultEvents. The callback IDs are GUA_PUSH_SET_TAG and GUA_PUSH_DELETE_TAG.

Code Example

// Register tag
UnionAdapterAPI.GetPushService().SetTag("Firebase", "tag");

// Unregister tag
UnionAdapterAPI.GetPushService().DeleteTag("Firebase", "Tag");