Tags
When creating a campaign, you can use several merge tags
Tags are placeholders that will be replaced with the actual content when the email is sent out. For example, the [UNSUBSCRIBE_LINK] tag will be replaced with a clickable link that the recipient can use to unsubscribe from your list.
All of your list’s subscriber fields are available as merge tags, including [EMAIL], [FNAME] and [LNAME], as well as any custom fields you have added to the list. Tags are always UPPERCASE and spaces are replaced with an underscore. For help with creating your custom fields see: How to create custom fields
Information about your list is also available as merge tags, for example [COMPANY_FULL_ADDRESS] will be replaced with your company information from the list settings.
There are also tags for automatically displaying information, for example [CURRENT_YEAR] will be replaced with the current year.
The most common tags are listed below:
Tag | Required |
[UNSUBSCRIBE_URL] | YES |
[COMPANY_FULL_ADDRESS] | NO |
[UPDATE_PROFILE_URL] | NO |
[WEB_VERSION_URL] | NO |
[CAMPAIGN_URL] | NO |
[LIST_NAME] | NO |
[LIST_SUBJECT] | NO |
[LIST_DESCRIPTION] | NO |
[LIST_FROM_NAME] | NO |
[CURRENT_YEAR] | NO |
[CURRENT_MONTH] | NO |
[CURRENT_DAY] | NO |
[CURRENT_DATE] | NO |
[COMPANY_NAME] | NO |
[COMPANY_ADDRESS_1] | NO |
[COMPANY_ADDRESS_2] | NO |
[COMPANY_CITY] | NO |
[COMPANY_ZONE] | NO |
[COMPANY_ZIP] | NO |
[COMPANY_COUNTRY] | NO |
[COMPANY_PHONE] | NO |
[CAMPAIGN_SUBJECT] | NO |
[CAMPAIGN_TO_NAME] | NO |
[CAMPAIGN_FROM_NAME] | NO |
[CAMPAIGN_REPLY_TO] | NO |
[CAMPAIGN_UID] | NO |
[SUBSCRIBER_UID] | NO |
[EMAIL] | NO |
[FNAME] | NO |
[LNAME] | NO |
Filters
Filters are advanced features that are used to modify the output of a tag, such as changing a tag to all uppercase or applying URL encoding.
Filters are applied in this format: [TAG_NAME:filter:filtername]
For example to display the subscriber’s first name in all uppercase letters you would use: [FNAME:filter: uppercase]
Another more advanced example: you might want to embed a sharing link to Twitter in your campaign, say the campaign URL itself.
Using only the tags you might embed it like this:
https://twitter.com/intent/tweet?text=[CAMPAIGN_SUBJECT]&url=[CAMPAIGN_URL]
But there is a problem, because Twitter expects your arguments to be URL encoded, and by that, I mean Twitter expects to get:
https://twitter.com/intent/tweet?text=my%20super%20campaign&url=https%3A%2F%2Fapp.mailpion.com%2Fcampaigns%2F1cart129djat3
But instead, it will get https://twitter.com/intent/tweet?text=my super campaign&url=https://app.mailpion.com/campaigns/1cart129djat3
To overcome this issue, we will apply the URLencode filter over our tags, therefore, the Twitter url becomes:
https://twitter.com/intent/tweet?text=[CAMPAIGN_SUBJECT:filter:urlencode]&url=[CAMPAIGN_URL:filter:urlencode]
But we can do even more, let’s say we want to make sure our Twitter text starts with a capitalized letter and the rest of the letters will be lowercase.
To accomplish this, we can apply multiple filters(separated by a pipe) to the same tag, for example:
https://twitter.com/intent/tweet?text=[CAMPAIGN_SUBJECT:filter:lowercase|ucfirst|urlencode]&url=[CAMPAIGN_URL:filter:urlencode]
The order in which you add the filters is the same order that which they are applied, the order can significantly affect the result.
Below is the entire list of filters:
urlencode | will urlencode your tag |
rawurlencode | will rawurlencode your url |
htmlencode | will convert html tags into their entities |
trim | will trim the white spaces from begining and end of your tag |
uppercase | will transform your tag in uppercase only chars |
lowercase | will transform your tag in lowercase only chars |
ucwords | will capitalize each first letter from your tag content |
ucfirst | will capitalize only the first letter of your tag |
reverse | will reverse your tag content |