Merge tags and personalisation
Modular Mail doesn’t know your subscribers, so it doesn’t fill in personalisation itself. Instead, it passes your ESP’s merge tags through to the export untouched, and your ESP fills them in when it sends.
Merge tags in fields
Section titled “Merge tags in fields”Marketers can type merge tags straight into fields:
| Field | Example | Works? |
|---|---|---|
| Text | Hi {{ first_name }}, | Yes |
| Text | Hi *|FNAME|*, | Yes |
| Text | Hi %%FirstName%%, | Yes |
| Link URL | {{unsubscribe_url}}, *|UNSUB|*, %%view_email_url%% | Yes |
| Subject and preheader | {{ first_name }}, your autumn edit is here | Yes |
Link fields accept addresses with no https://, so tags such as *|UNSUB|* are allowed.
Test emails sent from Modular Mail show the tags as typed. Send a test from your ESP to see them filled in.
What doesn’t work in fields
Section titled “What doesn’t work in fields”Fields are for content, and anything a marketer types is escaped so it can’t change the email’s structure. That means <, > and & in a text field appear as characters, not HTML:
- Tags written as HTML, such as Campaign Monitor’s
<unsubscribe>or<webversion>, can’t go in a field. - Logic with comparisons, such as
{% if total > 50 %}, can’t go in a field because of the>.
Put these in the template’s HTML instead, in a part that isn’t marked. For example, your developer can put the unsubscribe link and any conditional blocks in the footer.
<!-- In the footer's HTML, not in a field --><p>Don't want these emails? <unsubscribe>Unsubscribe</unsubscribe></p>Tags in the template
Section titled “Tags in the template”Everything in your template’s HTML is copied to the export exactly as written, so any ESP syntax works there: Liquid, AMPscript, HubL, conditional blocks, dynamic content and tracking parameters. This is the right place for logic that marketers shouldn’t change.
If a marker’s sample content contains a merge tag, the field starts with it filled in, which is a good way to show marketers what to use:
<p data-mm="greeting">Hi {{ first_name|default:'there' }},</p>Common unsubscribe tags
Section titled “Common unsubscribe tags”Every marketing email needs an unsubscribe link. These are the usual tags to use as a link’s URL. Check your ESP’s documentation for the exact syntax for your account.
| ESP | Unsubscribe URL |
|---|---|
| Mailchimp | *|UNSUB|* |
| Klaviyo | {% unsubscribe_url %} |
| Salesforce Marketing Cloud | %%unsub_center_url%% |
| HubSpot | {{ unsubscribe_link }} |
| Marketo | {{system.unsubscribeLink}} |
| Brevo | {{ unsubscribe }} |
In the starter template, the footer’s unsubscribe link is a link field whose help text reminds marketers to use their ESP’s tag.