Customisation cheat sheet

The following merge tags are used to insert dynamic content into your email. All merge tags are case-sensitive, so make sure to type them exactly as they are spelt below. Just type them where you'd like the value to appear.

Merge tags won't render when testing your templates – they'll be replaced with placeholder values, such as <<First name>> instead of {{FirstName}}. Read more about it here.

Contacts

{{ID}} The subscriber's unique ID.
{{EmailAddress}} The subscriber's email address.
{{FirstName}} The subscriber's first name.
{{LastName}} The subscriber's last name.

Links

{{UnsubscribeURL}} A link to a page where your subscriber can unsubscribe.
{{WebVersionURL}} A link for your subscriber to view the email in their browser
{{RewardsURL}} A link back to EmailOctopus. Earn $15 credit for every paid user you refer!
{{ConfirmURL}} Re-confirm a subscriber in a list. Using this will add a double opt-in date and status to a contact.

Info

{{SenderInfo}} Your physical address.
{{SenderInfoLine}} Your physical address on a single line.
{{TimeToRead}} Time to read your campaign; displayed as "x minute(s)".

Formatting merge tags

If you wish to format the contents of your merge tags, you can add a filter:

  • Fall back to text, specified by X, if the contents of the merge tag are empty.

{{YourMergeTag|default("X")}}

  • Lowercase the contents of the merge tag. E.g. john

{{YourMergeTag|lower}}

  • Uppercase the contents of the merge tag. E.g. JOHN

{{YourMergeTag|upper}}

  • Titlecase the contents of the merge tag. E.g. John

{{YourMergeTag|title}}

  • URL encode the contents of the merge tag to make it suitable for use in a query string.

{{YourMergeTag|url_encode}}

  • Format a date in following format: mm/dd/yyyy.

{{YourMergeTag|date("m/d/Y")}}

Conditional statements

We also support conditional if statements, but as this is an advanced feature, please test throughly before sending. Some examples:

{% if FirstName is empty %}

Content 1

{% else %}

Content 2

{% endif %}

{% if Type == "subscriber" %}

Content 1

{% else %}

Content 2

{% endif %}

{% if Age < 25 %}

Content 1

{% elseif Age < 50 %}

Content 2

{% else %}

Content 3

{% endif %}

Formatting dates

You can insert the day of the week in your local timezone in your campaign using the following tag:

{{ "now"| date("l", "TIMEZONE") }}

Insert the database timezone name in place of TIMEZONE inside the above merge tag. You can find the list of possible TZ database names here.

Escaping tags

If you use `{{`, `}}`, `{%` or `%}` in your email we'll presume you're trying to use a merge tag or conditional statement. These won't be rendered and they may cause a syntax error if you're not using them as per the documentation above.

If you want to include these combinations of characters in your email and for us to ignore them, wrap the text itself in curly braces

{{ 'I can include {{, }}, {% and %} here and EmailOctopus will ignore it' }}

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact us Contact us