ResourcesKnowledge Base

Content merge tags

A list of supported merge tags that can be used in the body of a message. Tags are replaced with the current values when sending a message, so you can, for example, personalize content in your campaign.

System tags are handled either as a variable (such as [% recipient.LAST_NAME -%] or merge tag [LAST_NAME]), and you need to distinguish between these.

The merge tag can be placed in the body of the message, subject and template, and no other operations are performed. Simply tag is replaced with specific data in the recipient's record.

Example of merge tag usage: You have [CUSTOM1] points in your account, so your final price is $[CUSTOM2].

In contrast, a variable can be used in templates and conditions, wherever other operations are performed with it.

Its format is either based on data stored in the recipient's record - then it is [% recipient.FIRST_NAME -%] or is based on your data (passed through API or data sources) - then the format is [% shared.BRANCH_NAME -%], or [% data.STRUCTURE_NAME -%]

Example of using a variable:
 

Order number [% shared.ORDER_NUMBER -%] is ready for shipping.
Total price is $[% IF recipient.CUSTOM1 =='a' -%]900[% ELSE -%]1000[% END -%].

Example of a combination of merge tag and variable:

Watch out, [% IF recipient.FIRST_NAME !='' -%][FIRST_NAME],[% ELSE -%][% END -%] do you know how many point you have?

System links

System links are special links that provide access to global features like browser preview or recipient unsubscribe, etc.

[SIGNOUT] – a link to a recipient unsubscribe page that is usually placed in the footer of the email message. The [SIGNOUT] tag contains only the URL for the unsubscribe page allowing the designer of the message to customize the wording and visual of the link in the email. If the tag is not inserted in the body of the email a default unsubscribe link will be placed at the top of the email message.

[PREVIEW] – a link for the browser preview that is usually placed in the header of the email message to allow recipients, who do not see the message correctly in the email client, display it in the browser.
If other content needs to be displayed in the browser, it is possible to use the condition with the shared.WEBVIEW variable, as follows: [% IF shared.WEBVIEW=='TRUE' -%]Content displayed in the browser[% ELSE -%]Content displayed in the email[% END %]

[CONFIRM_OPTIN] – a link to record the recipient's consent.

[CONFIRM_URL=xxx] – a link to record the recipient's consent. Instead of "xxx" enter the url where the link should lead (eg a thank-you page on your site). Clicking on this link will record all relevant recipient consent data under applicable legislation.

Personalization

Recipient related information valid at time of send. These values are sourced from the recipient record in the mailing list at the time of send. In case an API call has been used to send the message and recipient information has been part of the API call the information from the call takes precedence.

[VOCATIVE] – salutation
[PREFIX] – recipient's title
[FIRST_NAME] – recipient's first name
[LAST_NAME] – recipient's last name
[NICK_NAME] – recipient's nickname
[GENDER] – recipient's gender (M/F)
[EMAIL] – recipient's email address
[REPLY_TO] – recipient's reply-to address
[PHONE] – recipient's phone number
[MOBILE] – recipient's mobile phone number
[FAX] – recipient's fax number
[STREET] – recipient's street address
[ZIP] – recipient's ZIP code
[CITY] – recipient's city
[COUNTRY] – recipient's country
[STATE] – recipient's state
[CUSTOM1] – recipient's custom information #1
[CUSTOM2] – recipient's custom information #2 etc ... maximum number of custom fields is 25
[POLL XX] – poll where "XX" is the poll ID

Recipient data obtained:

[ENG_SCORE] – engagement score (0-5, the higher the value, the greater the engagement)
[ENG_TREND] – engagement trend (-2, -1 for negative trend, 0 for neutral and 1, 2 for positive trend)
[GEO_CONTINENT] – detected continent
[GEO_COUNTRY] – detected country
[GEO_REGION] – detected region/state
[GEO_CITY] – detected city
[GEO_OS] – detected operating system
[GEO_BROWSER] – detected browser or email client
 

All of the above mentioned tags have their value in the recipient.TAG structure, such as recipient.FIRST_NAME.

Campaign parameters

It is often necessary to work with certain campaign data in the body of the message. This is done by tags that insert campaign parameters into the body of the message.

[CAMPAIGN_NAME] – full campaign name
[CAMPAIGN_NAME_LC] – campaign name with lowercase letters and without diacritics and spaces (suitable for use with Google Analytics parameters)
[SUBJECT] – Campaign subject (eligible for the html title tag)

In addition there is an email.CAMPAIGN_VARIANT – variable for A/B tests that allows to identify different variants of campaign within the template and increase the possibilities of A/B testing using dynamic content directly in the templates. The variable can be of the A, B or empty value (in case A/B testing is not being used).Example use:

[% IF email.CAMPAIGN_VARIANT == '' -%]content without A/B test
[% ELSIF email.CAMPAIGN_VARIANT == 'A' -%]A version of the content
[% ELSE -%]B version of the content[% END -%]

Date and time

Campaigns can be personalised with date and time information at the time of send. Date and time tags allow you to place current date and time at the time of send in various formats. For advanced date and time operations in the templates please see the date & time templating functions

[SEC] – second
[MIN] – minute
[DAY] – day number of the month (e.g. 05)
[SDAY] – short format of the day number without leading zero (e.g. 5)
[DAYOFWEEK] – day of week number
[DAYOFYEAR] – day number of the year
[WEEK] – week number of the year
[MONTH] – month number of the year (e.g. 03)
[SMONTH] – abbreviated month number of the year without leading zero (e.g. 3)
[YEAR] – current year (e.g. 2020)
[SYEAR] – current year in abbreviated form (e.g. 20)

All the above mentioned tags have their value in the email.TAG structure, e.g. email.YEAR.

Campaign sharing on social networks

Today there are often added links into the campaigns to share it on social networks. This is done by special tags that allow you to measure these shares separately and, above all, to hide the specific personalization of a particular recipient and their unsubscribe links.

Facebook – [SHAREFB] provides a URL to share on Facebook
Twitter – [SHARETW] provides a URL to share on Twitter
Google+ – [SHAREGP] provides a URL to share on Google+
LinkedIn – [SHARELI] provides a URL to share on LinkedIn
Pinterest – [SHAREPIN] provides a URL to share on Pinterest
General – [SHAREGEN] provides a URL for generic sharing, eg. other social networks or placement on a company website.

All of the above tags also exist in the email.TAG structure as variables, eg. email.SHAREFB.

Templates

Tags used in the main template file to access campaign content areas:

[CONTENT] and [CONTENT_TXT] – loads the campaign content area into the template. If [CONTENT_TXT] is used the content is converted to non-HTML text variant. Each template can have up to 10 independent content areas – their use is based on the placement using the tags [CONTENT2], [CONTENT3], [CONTENT4] to [CONTENT10] or [CONTENT2_TXT], [CONTENT3_TXT], [CONTENT4_TXT] to [CONTENT10_TXT] for their plain-text variant.

The existence of content in each content area can be verified using variables in the data.CONTENT structure, such as data.CONTENT.5. The variable returns TRUE if there is content in this area.