On this page
Add merge tags to a campaign
Insert each contact's own data - names, your company details, action links - with merge tags.
Merge tags insert each contact's own data into your email - their name, your company details, subscription links and more. Write [FirstName] in your content and each recipient sees their own first name. Personalised emails get opened and clicked more, so merge tags are one of the simplest ways to lift performance. This guide covers the custom fields you create and the built-in tags MailMachine provides.
Default fields
Every list automatically includes three fields you can't change or delete:
- Contact ID
- Email address
- Subscription date
Beyond those, you add your own attributes and collect data through your forms - see Add attributes to your list.
Create a custom field
- Select Audience, then Lists.
- Select your list.
- Click the gear wheel on the right.
- In Manage Contact Attributes, click to enter an attribute name and choose its value type.
- Click Save.
Field names can't contain punctuation, special characters or spaces. Types are:
- Text - names and other text (up to 255 characters), phone numbers and so on.
- Number - an ID, an age, and the like.
- DateTime - a birthday, an anniversary.
Use a field in a campaign
Type the tag manually, matching the field name exactly. So Hello [FirstName], here's your weekly update! becomes Hello John, here's your weekly update!. You can use fallbacks for empty fields too - see Use merge tags with fallbacks.
The built-in tags
Recipient and campaign
[email]- the recipient's email address.[SUBJECT]- your campaign's subject line.
Sender (from your account details)
[SENDER_NAME],[SENDER_EMAIL]
Your company (from Settings > Company Profile)
[CLIENTS.COMPANY_NAME],[CLIENTS.ADDRESS],[CLIENTS.CITY],[CLIENTS.PROVINCE],[CLIENTS.POSTAL_CODE],[CLIENTS.COUNTRY],[CLIENTS.WEBSITE],[CLIENTS.PHONE]
Your physical address must appear in every email - see Add your physical address.
List
[LISTNAME]- the name of the list the email went to.
Actions (for headers and footers)
[FORWARD]- forward the campaign to a friend.[SUBSCRIBE]- subscribe (handy on forwarded emails).[UNSUBSCRIBE]- unsubscribe from this list.[GLOBAL_UNSUBSCRIBE]- unsubscribe from every list in your account.[SHOWEMAIL]- view the email in a browser, useful when images don't load.
Date
[DATE|0|format]- a dynamic date. See Add a date merge tag.
Merge tags in tracking links
You can drop merge tags into a tracking URL for sharper analytics - for example, tag traffic by company by putting [CLIENTS.COMPANY_NAME] into your UTM source. When sent, it resolves to each contact's company name in the URL, so your analytics can break traffic down by it.
Troubleshooting
Tags show as plain text - the syntax must match exactly (it's case-sensitive), with correct brackets and no stray spaces, and the attribute must exist on the list.
Some contacts show blanks - those contacts have no data in that field; add a fallback, and check the data imported correctly.
Tags don't work in the subject line - confirm your plan supports it, use the same syntax as the body, and preview before sending.
A custom attribute isn't available as a tag - make sure it saved, that its name has no spaces or special characters, and refresh the editor.
If a merge tag won't populate, open a support ticket.