Supported Personalization Tag Summary

As a convenience, a summary of supported personalization tags are listed below. For more detail on each kind of tag and best practices, continue reading.

1
2
3
4
5
6
7
8
{% assign default_attribute_tags = '`{{${city}}}`, `{{${country}}}`, `{{${date_of_birth}}}`, `{{${email_address}}}`, `{{${first_name}}}`, `{{${gender}}}`, `{{${language}}}`, `{{${last_name}}}`, `{{${last_used_app_date}}}`, `{{${most_recent_app_version}}}`, `{{${most_recent_locale}}}`, `{{${most_recent_location}}}`, `{{${phone_number}}}`, `{{${time_zone}}}`, `{{${twitter_handle}}}`, `{{${user_id}}}`, `{{${braze_id}}}`' %}
{% assign campaign_attribute_tags = '`{{campaign.${api_id}}}`, `{{campaign.${name}}}`' %}
{% assign canvas_attribute_tags = '`{{canvas.${name}}}`, `{{canvas.${api_id}}}`, `{{canvas.${variant_name}}}`, `{{canvas.${variant_api_id}}}`' %}
{% assign card_attribute_tags = '`{{card.${api_id}}}`, `{{card.${name}}}`' %}
{% assign device_attribute_tags = '`{{most_recently_used_device.${carrier}}}`, `{{most_recently_used_device.${id}}}`, `{{most_recently_used_device.${idfa}}}`, `{{most_recently_used_device.${model}}}`, `{{most_recently_used_device.${os}}}`, `{{most_recently_used_device.${platform}}}`' %}
{% assign email_list_attributes = '`{{${set_user_to_unsubscribed_url}}}`, `{{${set_user_to_subscribed_url}}}`, `{{${set_user_to_opted_in_url}}}`' %}
{% assign event_properties = 'These are custom to your app group and in the format `{{event_properties.${your_custom_event_property}}}`.' %}
{% assign custom_attributes = 'These are custom to your app group and in the format `{{custom_attribute.${your_custom_attribute}}}`.' %}
Personalization Tag Type Tags
Default Attributes {{ default_attribute_tags }}
Device Attributes {{ device_attribute_tags }}
Email List Attributes (learn more here) {{ email_list_attributes }}
Campaign Attributes* {{ campaign_attribute_tags }}
Canvas Attributes* {{ canvas_attribute_tags }}
Card Attributes* {{ card_attribute_tags }}
Event Properties {{ event_properties }}
Custom Attributes {{ custom_attributes }}

* Campaign, Card, and Canvas attributes are only supported in their corresponding messaging templates.

Most Recently Used Device Information

You can template in the following attributes for the user’s most recent device across all platforms. If a user has not used your application (e.g., you imported the user via REST API), then these values will all be null.

  • {{most_recently_used_device.${id}}} - This is Braze’s device identifier. On iOS, this is the Apple Identifier for Vendor (IDFV). For Android and other platforms, it is Braze’s device identifier, a randomly generated GUID.
  • {{most_recently_used_device.${carrier}}} - The most recently used device’s telephone service carrier, if available. Examples include “Verizon” and “Orange”.
  • {{most_recently_used_device.${idfa}}} - For iOS devices, this value will be the Identifier for Advertising (IDFA) if your application is configured with Braze’s optional IDFA collection. For non-iOS devices, this value will be null.
  • {{most_recently_used_device.${model}}} - The device’s model name, if available. Examples include “iPhone 6S” and “Nexus 6P” and “Firefox”.
  • {{most_recently_used_device.${os}}} - The device’s operating system, if available. Examples include “iOS 9.2.1” and “Android (Lollipop)” and “Windows”.
  • {{most_recently_used_device.${platform}}} - The device’s platform, if available. If set, the value will be one of ios, android, windows, windows8, kindle, android_china, web, or tvos.

Because there are such a wide range of device carriers, model names, and operating systems, we advise that you thoroughly test any logic that conditionally depends on any of those values. These values will be null if they are not available on a particular device.

Targeted Device Information

For push notification and in-app message channels, you can template in the following attributes for the device to which a message is being sent. That is, a push notification or in-app message can include device attributes of the device on which the message is being read.

  • {{targeted_device.${id}}} - This is Braze’s device identifier. On iOS, this is the Apple Identifier for Vendor (IDFV). For Android and other platforms, it is Braze’s device identifier, a randomly generated GUID.
  • {{targeted_device.${carrier}}} - The most recently used device’s telephone service carrier, if available. Examples include “Verizon” and “Orange”.
  • {{targeted_device.${idfa}}} - For iOS devices, this value will be the Identifier for Advertising (IDFA) if your application is configured with Braze’s optional IDFA collection. For non-iOS devices, this value will be null.
  • {{targeted_device.${model}}} - The device’s model name, if available. Examples include “iPhone 6S” and “Nexus 6P” and “Firefox”.
  • {{targeted_device.${os}}} - The device’s operating system, if available. Examples include “iOS 9.2.1” and “Android (Lollipop)” and “Windows”.
  • {{targeted_device.${platform}}} - The device’s platform, if available. If set, the value will be one of ios, android, windows, windows8, kindle, android_china, web, or tvos.

Because there are such a wide range of device carriers, model names, and operating systems, we advise that you thoroughly test any logic that conditionally depends on any of those values. These values will be null if they are not available on a particular device. Furthermore, for push notifications, it is possible that Braze may be unable to discern the device attached to the push notification under certain circumstances such as if the push token was imported via API, resulting in values being null for those messages.

Personalization

In some circumstances, you may opt to use conditional logic instead of setting a default value. Conditional logic allows you to send messages that differ based on the value of a custom attribute.

Additionally, you can use conditional logic to abort messages to customers with null or blank attribute values.

For example, if you’re sending a rewards balance notification to customers, there isn’t a good way to account for customers with low and null balances using default values.

In this case, there are two options that may work better than setting a default value:

  1. Abort the message for customers with low, null and blank balances.

    NoBalanceAbort

  2. Send a completely different message to these customers, perhaps something along the lines of:

1
2
3
4
5
{% if ${first_name} != blank and ${first_name} != null %}
Hello {{${first_name} | default: 'there'}}, thanks for downloading
{% else %}
Thanks for downloading
{% endif %}

In this example, a user with a blank or null first name will get the message “Thanks for downloading”. Note that as a best practice, you should still include a default value for first name.

WAS THIS PAGE HELPFUL?