The merge tag variables available to use in a campaign depend on the fields you have created in the brand. However, there are some merge tag variables that are always available.
ID of the campaign.
ID of the contact.
URL to the contact's unsubscribe page.
URL to view the camapaign in the browser. ("View in Browser" link)
Using the if merge tag you can make the content of your campaigns conditional on the attributes of the contact. The ELSE section is optional.
*|IF:STATUS = 'paid'|* <p>Thank you for subscribing!</p> *|ELSE:|* <p><a href="#">Subscribe now and receive 10% off</a></p> *|END:IF|*
The if merge tag can also include 1 or more ELSEIF sections:
*|IF:STATUS = 'paid'|* <p>Thank you for subscribing!</p> *|ELSEIF:STATUS = 'cancelled'|* <p><a href="#">We want you back! Join now and receive 10% off</a></p> *|ELSE:|* <p><a href="#">Subscribe now and receive 10% off</a></p> *|END:IF|*
The following operators may be used with the if merge tag:
Greater than or equal
Less than or equal
You can use IFNOT to check if a contact attribute is an empty string, false, 0, or unset.
*|IFNOT:REFERRED_FRIEND|* <p><a href="#">Please let a friend know about our site!</a></p> *|END:IF|*
DEFAULT function to provide a default value for a variable when it is not defined or has an empty value.
When contact has a first name available, output their first name. Otherwise, output the word friend.
DATE_FORMAT function to format a date/time into the desired format.
Output the current four digit year ex. 2020
Output the current year, month, and day ex. 2020-11-30
Output the current month, day, and year ex. 11/30/2020
Output the current day, month, and year ex. 30/11/2020
Output month name, day, and year ex. November 30, 2020
Output the year, month, and day of the current RSS item published date
|%A||Long week day||Monday|
|%a||Short week day||Mon|
|%d||Day of month||02|
|%H||Hour (24 hr clock)||15|
|%I||Hour (12 hr clock)||03|
SAFE function to indicate that a variable should be output as HTML. Safe is helpful when you have a variable containing HTML that needs to be output as is, without any escaping.
Outputs the value of the variable MY_HTML without HTML escaping.
URL function to urlencode a variable.
Outputs the value of FIRST_NAME url encoded.
Updated 4 months ago