Manage user data with tags
Tags are one of the most useful tools we offer. A lot of sophisticated Pushwoosh functionality is based on this feature. Using tags, you can segment your audience and send push notifications to some users, but not others.
Tags contain any arbitrary data that you associate with a particular user or device. This includes username, ID, city, favorite football team, preferred news categories, or any other piece of information about your users. Let’s take a closer look.
Tag values
Anchor link toTag values can help you make your push campaigns smarter. Each tag is capable of storing nearly limitless number of values. Basically, this means that one tag would be enough to record a specific type of information about each end-user in your database.
There are only a few tags available for each account, but considering the nearly-infinite space for each tag, just a couple of tags are enough to gather an enormous amount of information about your users and set up very complex targeting patterns.
Types of tags
Anchor link to- Integer — used for the integer data (amount of in-game cash acquired, level achieved, age).
- String — used for string values (username, e-mail, identifiers).
- List — the same as String type, but each user may have multiple values set simultaneously (music preferences, news categories, cuisine preferences).
- Boolean — true / false type of Tag.
- Date — used for calendar dates. Basically, this is an integer type tag which stores Unix Epoch timestamps (automatically converted from/into Gregorian date).
- Price — allows to set values according to specified currency in the “*.XX” format (https://en.wikipedia.org/wiki/ISO_4217).
- Version — used for versioning. The example of allowed format is w.x.y.z (Major.Minor.Patch.Build). Max value for each version part is 9999, so the max version number cannot be greater than 9999.9999.9999.9999.
Tag operators
Anchor link toEach Tag type has a specific set of operators applicable. Tag operators define the relationship between the Tag and its values for segmentation purposes.
- Integer Tag operators:
is,is not,are,not in,not set,any - String Tag operators:
is,is not,are,not in,not set,any - List Tag operators:
in,not in,not set,any - Boolean Tag operators:
is(true/false),not set,any - Date Tag operators:
exactly on,on or after,on or before,between,not set,any - Price Tag operators:
is,is not,greater or equals,less or equals,between,in,not in,not set,any - Version Tag operators:
is,is not,greater or equals,less or equals,between,in,not in,not set,any
Tag scope: General vs User-specific
Anchor link toWhen creating a tag, you choose how its values are stored:
- General (default): the tag value is stored per device (HWID). Each device of the same user can hold a different value independently.
- User-specific: the tag value is stored per user (UserID). When set via UserID, the value is applied to all of the user’s devices at once. Useful for attributes that belong to the person, not a particular device: subscription tier, loyalty points, preferred language.
Default tags
Anchor link toThese tags are available by Pushwoosh out-of-the-box, so you don’t have to (and, in fact, should not) set them manually. Most of them are set from the application and sent over to our server via registerDevice and other API calls, and some are set by the server itself.
| Name | Type | Where it’s set | Description |
|---|---|---|---|
| Application Version | Version | SDK | Current version of the app installed on a device |
| Browser Type | String | SDK | When a device is registered for your web project, its type – mobile or desktop – is tracked automatically |
| City | String | Server | Latest registered geographical location of a device |
| Country | String | Server | Latest registered geographical location of a device |
| Device Model | String | SDK | Indicates the device model whereon the app is installed |
| First Install | Date | Server | Indicates the time when a device was registered for notifications for the first time |
| In-App Product | List | SDK | The in-app products purchased by a user of the app |
| Last In-App Purchase Date | Date | SDK | The date of the latest in-app purchase made on a device |
| Language | String | SDK | Two-letter lowercase abbreviation of a device’s locale according to ISO-639-1; taken from device settings |
| Last Application Open | Date | Server | The time of the most recent app launch on a device |
| OS Version | Version | SDK | The version of an operating system running on a device |
| Platform | String | SDK | The platform on which the user is using your project. |
| Push Alerts Enabled | Boolean | SDK | Indicates whether push alerts are allowed in device settings |
| SDK Version | Version | SDK | The version of the Pushwoosh SDK implemented on a device |
| Unsubscribed Emails | Boolean | SDK | Indicates whether a user has unsubscribed from receiving emails from your app |
| Bounced Email | Date | Server | The date when a hard bounce occurred for this email address. Stored as Date to enable time-based segmentation, for example, to exclude users with recent bounces. |
| Live Activity ID | String | SDK | Used to manage live activities by associating a Live Activity ID with the device. Automatically cleaned up after 12 hours. |
Custom Tags
Anchor link toThis is where your creativity comes in to achieve your specific business goals. Custom tags can be created based on the segmentation logic or targeting pattern that is appropriate for your unique business needs.
How to set up a custom tag
Anchor link toTo begin, create and configure tags in the Pushwoosh Control Panel:
- Go to the Tags page of your Control Panel and click Add tag.
- Name your tag, pick the type, and choose whether it should be General (device-level) or User-specific (user-level).
- Click Save Tag.
Using the default City tag
Anchor link toDevice’s location is determined based on its IP address at the moment your app was launched on that device for the last time. GeoIP submits the location data to Pushwoosh, and Pushwoosh saves the location received from GeoIP as a City tag value for a particular device.
In some cases, the location submitted by the GeoIP differs from the city name — for example, when it refers to an area of a city or other administrative unit. Please be careful when using the default City tag for segmentation purposes: make sure to select the proper values.
For example, if you’re going to target users from Munich, you have to cover it with a bunch of City tag values, including “Munich” itself (with all the corresponding values, such as different variants of spelling which could be returned by GeoIP and saved as tag values) and several nearby areas.
Tags statistics
Anchor link toOnce your application sets Tag values, you can view and analyze the statistics about these values, presented in the Control Panel using either a pie chart, bar chart, or table view.
