Attributes & tags
Store data against your users
Attributes and tags are predefined keys that allow data values to be stored against a user profile or devices.
An Attribute is linked one-to-one to a user profile or a device profile, holding a single value that may be updated at any time, for example, last_name
or last_deposited
. Attributes may be used for segmentation or personalisation of messaging campaigns.
There are a number of defined system attributes to store information such as mobile number, email address, etc; customers can create their own defined custom attributes to allow them maximum flexibility for their use case.
A Tag can be set multiple times against a device with different values (eg. a one-to-many relationship). Each record is timestamped and cannot be modified. Tags may be used to record user behaviour over time and can be used in segmentation for messaging campaigns.
View and edit
To view or edit the attributes and tags already defined for a project, navigate to Data > Data Manager > Attributes & Tags.
The table shows which are configured as Device or Profile attributes.
The list can be filtered by using the search fields at the top of the table.
Attributes can be edited or deleted using the icons on the relevant table row.
When you update an attribute, the name and type cannot be edited. You may update the display name, alias, device attribute, and profile attribute status only.
When you delete an attribute it will be scheduled for deletion along with the data. This can take a couple of hours to complete.
Create a custom attribute or tag
In order to store data against a user or device profile, the attribute or tag must be created first by pressing the Create tag button.
Set the name, data type and choose whether the new key should be used as a User Profile or Device attribute. If none of those options are selected, a tag will be created.
Naming attributes and tags
The name should avoid spaces and dots, and ideally limit to lowercase letters, digits and underscore. This will allow easier use of the attribute or tag through the mobile and web SDKs and the API.
The Display Name field can be used to provide a friendly name for the field in the Xtremepush interface. For example, for an attribute named
first_name
, you can setFirst Name
as the Display name.You can also set an Alias, useful if you have named an Android and an iOS tag differently and you need to alias the two together to keep analytics consistent between apps.
Data type | Value format |
---|---|
String | Text characters (max 100 characters). |
Number | A signed numeric value with max 4 digits on decimal places and max 14 digits in total. If a number has more than 4 decimal places, it will either be rounded up or down. For example, 10.22222 will be saved as 10.2222 , but 10.22225 will be saved as 10.2223 . |
Integer | A signed numeric value without a decimal. If a numeric value has decimal places, it will be rounded up to a whole number. |
DateTime | Date with time, ISO-8601 (YYYY-MM-DD HH:MM:SS ) or UK format (DD-MM-YYYY HH:MM:SS ). All converted to YYYY-MM-DD HH:MM:SS for DateTime when the value is saved. Date attributes are always in UTC timezone, so if your project is in a different timezone, you can indicate the timezone in the attribute value: 2023-12-13 11:36:00 +01:00 . |
Date | Date without time. ISO-8601 (YYYY-MM-DD ) or UK format (DD-MM-YYYY ). All converted to YYYY-MM-DD for Date when the value is saved. |
Array | JSON array, for example:["value1","value2","value3"] . |
Object | JSON object, for example:{ "order_total": "12.34", "item_count": 3, "items": [{...}, {...}, ...] } . |
Boolean | true , false or 1 , 0 or yes , no or T , F or Y , N . All of these versions will be converted to a numeric format (1/0). |
Invalid values for attribute types
Invalid values for attribute types will be discarded during imports and when assigning attributes to the profile (the value won't get updated).
Unenforced attributes
Old attributes are not automatically enforced for validation. In order to maintain data consistency and enable validation for those attributes, click on the Unenforced label next to the relevant attribute under Data > Data Manager, and follow the process outlined in the opened modal to convert your attribute type.
Attribute limits
There’s a limit on the total number of custom attributes that can be stored on a project. String type attributes take up more space than other types. Using the correct type will allow for more attribute space. If, for instance, an attribute will store
true
,false
or1
,0
values, you should select a boolean type. It's not possible to change the type of an attribute after it's created, so consider this carefully.
System attributes
Field name | Description |
---|---|
user_id | Unique user ID from your backend system. Primary identifier. |
customer_id | Unique customer ID from your backend system if different from above. This is an optional, secondary identifier. |
email | User email address. Importing this value will automatically update theemail_addressable system attribute. |
email_addressable | This defines if the email address is reachable. This field should not usually be imported. It is set automatically when importing a value for email based on basic validation of the format of the email address. It will also be set to 0 by the system if messages sent to the user fail as permanently undeliverable. |
email_subscription | Status of user's email subscription.1 = subscribed, 0 = unsubscribed, or leave blank for undefined (not explicitly unsubscribed but not yet gained permission to contact).Should be included when importing email, if not it will default to undefined. |
mobile_number | User mobile number. See the information in Manual entry for the correct E.164 number format. |
sms_addressable | This defines if the SMS number is reachable. This field should not usually be imported. It is set automatically when importing a value for mobile_number based on basic validation of the format of the mobile number. It will also be set to 0 by the system if messages sent to the user fail as permanently undeliverable. |
sms_subscription | Status of user's SMS subscription. Uses the same format as email_subscription .Should be included when importing mobile_number , if not will default to undefined. |
whatsapp_number | Use the same format as mobile_number . |
whatsapp_addressable | If the WhatsApp number is reachable. This field should not usually be imported. It is set automatically when importing a value for mobile_number based on basic validation of the format of the mobile number. It will also be set to false by the system if messages sent to the user fail as permanently undeliverable. |
whatsapp_subscription | Status of user's WhatsApp subscription. Use the same format as email_subscription .Should be included when importing whatsapp_number , if not will default to undefined. |
language | Language must be set using a two-letter ISO 639-1 language code. Eg. English should be entered with the code en . |
timezone | User's timezone must be set using the format from the ICANN tz database. Eg. The timezone for the London has the Format Europe/London , New York is America/New_York & Lagos is Africa/Lagos . |
Updating values for existing attributes
Once that a tag or attribute has been created, there are several ways to ingest data into the system.
Assigning attributes manually from the platform
It is possible to assign attributes against user profiles and set the value, which is practical when testing from the platform. To do so, navigate to Data > Users, click on the desired profile ID and navigate to the Data > scroll to the Attributes section.
Click on Assign attribute. Select one of the predefined attributes from the project and type the value for this attribute > click on the Save icon.
From this same page, you will be able to review stored attributes and delete them.
Importing data
Whenever you are importing user profiles (from a CSV or via API) into the system you can assign them attributes. Review our guide on importing and creating user profiles for more details.
Passing data from the SDKs
Our web and mobile SDKs allow you to tag interactions.
You can set values against the current device accessing your website or apps for existing tags by using the tagHit
method.
For more details on this method review our dedicated guides for web, Android and iOS.
If you haven't set the user ID for the current device, then the data will be associated against an anonymous profile. That's why it's important to set the user ID every time your customer ID is available on app open or when a user logs in to make sure the identity is set.
Updated 7 months ago