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
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.
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.
Dynamic Content
Dynamic content in email refers to content blocks that change based on subscriber data, behavior, or preferences within a single email send.
Email Accessibility
Email accessibility ensures marketing emails are usable by people with disabilities, including those using screen readers, keyboard navigation, or assistive technologies. It follows WCAG 2.1 guidelines for structure, contrast, semantics, and descriptive content.
Email Cross-Sell
Email campaigns that recommend complementary or upgraded products to existing customers based on purchase history and behavior.
Email Template Builder
Email template builders range from drag-and-drop editors to coded frameworks like MJML, requiring compatibility testing across 100+ email client and device combinations.
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.