Skip to main content

SetTag/DeleteTag

AndroidiOS
If you were looking for the method for use with Unity, see SetTag/DeleteTag for Unity SDK.

Games can set different tags for users, such as gender, age, education background, hobbies, and so on. Player Network SDK provides a set of default tags for games to push specified notifications to the target audience.

Sending tagged notifications is the same as sending regular notifications. Games only need to select a tag to send the push notifications to the tagged audience.

caution

Tag format: Tags cannot contain space.

Function definition

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

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

Input parameters

ParameterTypeDescription
ChannelFStringThe specified channel to push notifications.
Example: "Firebase"
TagFStringTag
Cannot be null or contain spaces.

Observers

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

The callback methodID is kMethodIDPushSetTagkMethodIDPushDeleteTag.

Code sample

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

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