Tags for the Flutter Plugin
Set device tags, contact tags, and tag groups for audience segmentation.
For information about tags, including how to use them for segmentation and targeting, see the Tags user guide.
Channel Tags
Channel tags are tags managed on the Channel by the SDK. Device tags (tags without a group) can be modified or fetched from the Channel.
Airship.channel.addTags(["flutter"]);
Airship.channel.removeTags(["some-tag"]);
// Accessing channel tags
List<String> tags = await Airship.channel.tags;Channel Tag Groups
Tag groups are tags scoped within a group. Tag groups can be modified from the SDK but cannot be fetched. Device tags (tags without a group) can be fetched. If you need to be able to fetch tag groups, consider using subscription lists.
Airship.channel.editTagGroups()
..addTags("loyalty", ["silver-member"])
..removeTags("loyalty", ["bronze-member"])
..apply()Contact Tag Groups
Contact tag groups are tags scoped within a group at the Contact level. Tag groups can be modified from the SDK but cannot be fetched. If you need to be able to fetch tag groups, consider using subscription lists.
Airship.contact.editTagGroups()
..addTags("loyalty", ["silver-member"])
..removeTags("loyalty", ["bronze-member"])
..apply()Verifying Tags
To verify that tags have been set correctly, look up the channel or contact in the Contact Management view. You can search by Channel ID or Named User ID to view the tags and tag groups associated with a channel or contact.
Categories