Tags and Filters
When sending a campaign, you are able to use a number of custom tags and filters.
Some of the most common tags are found below:
In addition, each of the above tags receive a set of “filters.” Filters are a simple way of transforming the tag in some way or another. For example, you might want to embed a link to Twitter in your campaign URL itself.
Using only tags, you would embed it like:
But there is a problem, because Twitter expects arguments to be URL encoded:
But instead it will get
https://twitter.com/intent/tweet?text=my super campaign&url=http://www.domain.com/campaigns/1cart129djat3
…which includes spaces and isn’t “correct” in URL-land. In order to overcome this issue, you need to apply filters over the tags. Therefore the URL becomes:
…using the urlencode filter (you simply place the word “filter” after a colon, followed by another colon and the filter you’d like to use).
Let’s say we want to make sure our Twitter text starts with a capitalized letter and the rest of the letters are lowercase.
In order to accomplish this, you would apply multiple filters (separated by a pipe character) to the same tag, for example:
(Please note, the order in which you add the filters is the same order in which they are applied)
Here is the entire list of filters:
|urlencode||will urlencode your tag|
|rawurlencode||will rawurlencode your URL|
|htmlencode||will convert HTML tags into their correct entities|
|trim||will trim the white space from the beginning and end of your tag|
|uppercase||will transform your entire tag to uppercase|
|lowercase||will transform your entire tag to lowercase|
|ucwords||will capitalize the first letter of the words in your tag’s content|
|ucfirst||will capitalize only the first letter of your tag’s content|
|reverse||will reverse your tag content|