Definition
Merge tags, also called personalization variables or substitution strings, are code snippets embedded in email templates that get replaced with actual data at send time. The most common example is inserting a recipient's first name into the greeting, but merge tags can pull any data from your subscriber database, including account numbers, purchase history, location, custom fields, and preference selections.
Every ESP implements merge tags differently, but the concept is universal. The email template contains placeholders like {{first_name}} or [FirstName], and when the email is sent, the ESP substitutes each placeholder with the corresponding value from that subscriber's record. This allows a single campaign to feel individually addressed to every recipient.
How It Works
Merge tag syntax varies by ESP and template language. Common formats include curly braces like {{first_name}} used by Mailchimp and many modern ESPs, bracket syntax like [First Name] used by older platforms, percent-based syntax like %FIRST_NAME% used by some enterprise systems, and language-specific syntax like Liquid's {{ subscriber.first_name }} or Handlebars' {{ firstName }}.
Beyond simple field replacement, merge tags can include fallback values that display when a field is empty or unavailable. For example, {{first_name:there}} might render "John" if the first name exists or "there" if it does not. More advanced implementations support conditional logic, default values, and formatting transformations directly within the tag syntax.
Best Practices
Always provide fallback values for personalization fields, especially first names. An email that says "Hello ," with a missing name looks unprofessional and automated. Test merge tags by sending proofs with accounts that have various data scenarios, including missing fields, very long values, and special characters. Avoid relying on merge tags that pull from outdated or unreliable data sources. Format merge tag values to match the context, such as capitalizing names or formatting dates consistently. Document your merge tag syntax and available fields for your team to ensure consistent usage across campaigns.
Related Glossary Terms
Accessible CTA (Email)
An accessible CTA is a button or link coded with sufficient colour contrast, visible focus states, descriptive screen-reader text, and a minimum touch target of 44×44 pixels.
Adaptive Design
Adaptive design in email uses predefined layouts that adjust to specific device or client widths, rather than fluidly resizing to every possible screen.
AMP for Email
AMP for Email is a technology that allows interactive, dynamic content to live inside an email message, enabling forms, carousels and live updates.
AMP for Email
AMP for Email is a Google-developed framework that allows email messages to include interactive elements like forms, carousels, accordions, and live content. It turns static emails into dynamic, interactive experiences directly inside the inbox.
Autoplay Video in Email
Autoplay video in email refers to the limited ability to play video content automatically when an email is opened, using specific client-supported techniques.
Dark Mode
Dark mode in email refers to how email clients render messages when the recipient has dark mode enabled. It affects colour display, image rendering, and readability. Designers use CSS media queries and hybrid coding techniques to control the dark mode appearance.
Frequently Asked Questions
The result depends on the ESP and the tag syntax. Some render nothing (producing awkward text like "Dear ,"), some display a default fallback, and some leave the raw tag visible. Always specify fallback values to handle empty fields gracefully.
Yes. Most ESPs support merge tags in subject lines and preheader text. However, subject lines with personalization may trigger spam filters if used excessively or for over-promising. Use personalization in subject lines thoughtfully.
Usually yes, depending on the ESP. Some systems treat `{{FirstName}}` and `{{firstname}}` as the same field, while others distinguish them. Check your ESP's documentation and standardize on a naming convention.
There is no hard limit, but each merge tag requires a database lookup and increases rendering time. Performance impact is usually negligible for standard campaigns, but high-volume sends with dozens of tags per email may benefit from caching or batch processing.
Yes. Merge tags are typically replaced before the multipart MIME message is assembled, so the plain text version receives the same personalized values as the HTML version. Always check both versions in testing to confirm correct rendering.