Skip to main content
SDK Version

Tags

The tags feature enables you to segment your audience by categorizing devices into meaningful groups. Tags can represent any attribute or behavior you wish to track, and each device can have an unlimited number of tags.

This capability is particularly valuable for applications that do not use authentication, where most users are anonymous. By assigning tags, you can create flexible audience segments for personalized messaging, campaigns, or in-app experiences.

Common use cases

Typical use cases for tags include categorizing devices based on model, capabilities, preferences, or user actions.

Examples:

  • Device attributes: tablet, hasCamera, en-GB
  • User interests: wants_news_for_music, subscribed_newsletter
  • Behavioral events: bought_shoes, visited_store_x

You can also allow users to subscribe or unsubscribe from predefined categories, or automatically assign tags when specific app events occur.

Working with Tags

Tags become available only after a device has been successfully registered in Actito. Therefore, any tag-related operations should be performed after device registration (for example, after launch() completes).

Retrieving tags

To retrieve the list of tags currently assigned to the device:

const tags = await Actito.device().fetchTags();

Adding tags

To assign one or more tags to the device:

const tags = ['React Native', 'subscribed_newsletter'];

await Actito.device().addTags(tags);

This will associate the specified tags with the device. Adding the same tag multiple times has no effect — tags are unique per device.

Removing a specific tag

To remove a specific tag from the device:

await Actito.device().removeTag('React Native');

Once removed, the device will no longer belong to the corresponding tag.

Removing all tags

To clear all tags associated with the device:

await Actito.device().clearTags();

This operation removes all existing tags and effectively resets the device’s tag segmentation state.

Limitations

Tag naming rules are standardized. Tags added using addTag() or addTags() must comply with the following constraints:

  • The tag name must be between 3 and 64 characters in length.
  • Tags must start and end with an alphanumeric character.
  • Only letters, digits, underscores (_), and hyphens (-) are allowed within the name.

Here are some examples:

  • ✅ premium_user
  • ✅ en-GB
  • ❌ @user