Campaign tags, filters and unsubscribe links


When sending a campaign, you are able to use a number of custom tags and filters.
Most common tags are listed below: 

 
Tag Required
[UNSUBSCRIBE_URL] YES
[COMPANY_FULL_ADDRESS] YES
[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
 
Now, each of the above tags is able to receive a set of filters.
Filters are a simple way of transforming the tag in a way or another, for example you might want to embed a sharing link to twitter in your campaign, say the campaign url itself.

Using only the tags you would embed it like:

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=http%3A%2F%2Fwww.domain.com%2Fcampaigns%2F1cart129djat3

but instead it will get https://twitter.com/intent/tweet?text=my super campaign&url=http://www.domain.com/campaigns/1cart129djat3

In order to overcome this issue, we will apply filters over our tags, therefore, the twitter url becomes:

https://twitter.com/intent/tweet?text=[CAMPAIGN_SUBJECT:filter:urlencode]&url=[CAMPAIGN_URL:filter:urlencode]

Pretty simple eh?
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.
In order to accomplish this, we can apply multiple filters(separate by a pipe) to same tag, for example: 

https://twitter.com/intent/tweet?text=[CAMPAIGN_SUBJECT:filter:lowercase|ucfirst|urlencode]&url=[CAMPAIGN_URL:filter:urlencode]
Please note, the order in which you add the filters is the same order they are applied.

Bellow is the entire list of filters, for now there are a few, but in the future the number might increase.
 
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
Putting an unsubscribe link on campaigns

It's mandatory to place an unsubscribe link on all your emails in order to comply with the international email standards. If you skip to add the URL, it will throw you an error while proceeding to the next steps. Fortunately, adding an unsubscribe link on your campaigns is pretty simple than what explained above. [UNSUBSCRIBE_URL] is the tag for this. So, while designing the campaign, you can place this tag anywhere in the email. But if you place the link directly, it will show up a lengthy URL and that might make your campaign look ugly. To avoid this, you can embed this as a hyperlink on your campaigns. For that, simply write "Unsubscribe" or something like that in your campaign (you might already have such a text in your templates) , then select that text and  create a hyperlink by clicking the button  . Now a window will pop and from there, select the link type as "URL", protocol as "" and URL as "[UNSUBSCRIBE_URL]". Click OK. You're done.

Also, it's recommended to publish the company details as well as in the emails. Use the tag  
[COMPANY_FULL_ADDRESS] for this. You can simply put this tag in the email body without any hyperlinks. This tag will be replaced with the company address you entered while creating the contact list. Though it's not a mandatory thing. 

Categories: Read before you start