Skip to main content

Register or Unregister Tag Push (SetTag/DeleteTag)

AndroidiOS
If you are using the Unity engine, please refer to Unity SDK's SetTag/DeleteTag here.

Games can set tags for users, such as gender, age, education level, hobbies, etc.Player Network SDK provides a set of default tags for games, used to push specified notifications to target audiences.

Sending tag push messages is similar to sending push messages; however, when adding push messages, you must select a personalized push for the audience scope.

caution

When setting tags, note tags must not contain spaces.

Function Definition

// Register tag
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool SetTag(const FString Channel, const FString Tag);

// Unregister tag
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool DeleteTag(const FString Channel, const FString Tag);

Parameter Details

ParametersTypeExplanation
ChannelFStringChannel Definition
Example "Firebase"
TagFStringTag
Cannot be null or contain spaces

Callback processing

The callback handling interface is PushBaseResultObserver.The callback data structure is BaseResult.

Callback ID is kMethodIDPushSetTag, kMethodIDPushDeleteTag.

Code example

// Register tag
UINTLSDKAPI::SetTag("Firebase", "INTL_TAG");

// Unregister tag
UINTLSDKAPI::DeleteTag("Firebase", "INTL_TAG");