Dynamic Tags and Modifiers

Dynamic Tags are pieces of text that are replaced with their corresponding value of what they represent. Use them to personalize your email content, subject line or any other element that support those tags.

For example **|user.firstname|** will be replaced with the user firstname when the email is sent or preview.

Depending on their usage place those can contain information about:

  • campaign: **|campaign.type|** will display campaign type.
    • _id, title, type, newsletter.sentDate are available
  • template **|template.title|** will display template title
    • _id, type, title are available
  • user: display user attributes. **|user.country|** will display user country
    • any user attribute
  • event : display attributes from the event. **|event.query|** will display query value for search event
    • for each event a set of distinct attributes are available
  • voucher (only available in transactional campaigns) **|voucher_code|**. View Setup -> Vouchers

Modifiers represent various method that are applied to the value of those dynamic tags. We support the following modifiers:

  • date: will turn a numeric date into a readable text
  • truncate(param): truncate the value to maximum length specified in param. Default is 30
  • pretty_price(param): value gets rounded to 2 decimals. If param passed is true than decimals are removed for values that are round. Pass false if you need to display 2 decimals, also .00
  • md5: convert to md5
  • b64encode: encodes to base64
  • b64decode: decodes from base64

If the attribute is missing, you can set a default value to be displayed. This can be used for any tag. Add |default(‘default_value_here’) after the tag name, so in the end will look like this:

**|user.name|default('Dear User')|**


Related Articles