Mailfois
Mailchimp

Mailchimp email coding cheat sheet

The tags and rules you need to code an email or a module for Mailchimp: the unsubscribe link, personalisation with a fallback, the view-in-browser and address tags, editable regions and how to get your HTML in. Checked against Mailchimp's own documentation on 27 October 2026.

Unsubscribe
<a href="*|UNSUB|*">Unsubscribe</a>
First name
*|FNAME|* (Merge tags)
With a fallback
*|IF:FNAME|*Hi *|FNAME|*,*|ELSE:|*Hi there,*|END:IF|*
View in browser
<a href="*|ARCHIVE|*">View this email in your browser</a>
Preferences
<a href="*|UPDATE_PROFILE|*">Update your preferences</a>
Postal address
*|HTML:LIST_ADDRESS_HTML|* (or *|LIST:ADDRESS|* as plain text)

The Mailchimp unsubscribe link

Put this in the footer of every marketing email you code for Mailchimp:

<a href="*|UNSUB|*">Unsubscribe</a>
  • *|UNSUB|* is required in every campaign.

The law in most countries also wants the unsubscribe to be easy to find and free to use: see the email rules by country.

Personalisation in Mailchimp: first name with a fallback

Mailchimp uses Merge tags. A first name on its own:

*|FNAME|*

With a fallback, so an empty field never shows a blank or a raw tag:

*|IF:FNAME|*Hi *|FNAME|*,*|ELSE:|*Hi there,*|END:IF|*
  • View in browser: <a href="*|ARCHIVE|*">View this email in your browser</a>
  • Preferences: <a href="*|UPDATE_PROFILE|*">Update your preferences</a>
  • Postal address: *|HTML:LIST_ADDRESS_HTML|* (or *|LIST:ADDRESS|* as plain text)

Making a coded template editable in Mailchimp

Mailchimp template language: mc:edit (unique name) marks editable content, mc:repeatable a block people can duplicate, mc:variant alternative layouts of a repeatable block, mc:hideable a section people can remove.

<table mc:repeatable="story" mc:variant="Image left"><tr><td><img mc:edit="story_img" src="https://example.com/a.png" alt=""></td><td mc:edit="story_text"><p>Story text</p></td></tr></table>

Getting your HTML into Mailchimp

Campaigns > Email templates > Code your own: paste the code, import an HTML file, or import a ZIP (one HTML file, images in the root). Images in a ZIP are uploaded to Content Studio and given absolute paths.

Limits worth knowing

  • Custom-coded templates need a Standard plan or higher.
  • ZIP imports must be under 1 MB with only one HTML file; file names use letters, numbers and hyphens.
  • CSS is not inlined unless you tick Automatic CSS Inliner in the template settings.
  • mc:edit names must be unique; never nest editable areas, and variant blocks must sit next to each other.

What Mailchimp calls things

Every platform has its own words for the same ideas. Mailchimp's, in plain English:

The ideaMailchimp calls itWorth knowing
One-off sendRegular emailA single email you write once and send to a chosen audience, segment or tag.
Automated journeyMarketing automation flowA multi-step automated path where contacts move through emails, waits and branches. Renamed from “Customer Journey”, help URLs and some UI still say journey.
Trigger / entryTriggerThe event adding a contact to a flow; up to three per flow, refinable with filters.
Static groupTagA manual internal label grouping contacts. Contacts never see or choose their tags. Groups are also static but contact-facing. Tags are internal only.
Dynamic groupSegmentA saved set of conditions that automatically recalculates which contacts match.
Customer recordContactOne person’s record: email, status, fields, tags and activity history.
Custom fieldAudience field (merge field)A custom column on the contact record you can also merge into email copy.
Behavioural eventEventA named action sent to Mailchimp via the API, usable as a trigger or segment condition. Events must be pushed by developers, Mailchimp doesn’t collect them automatically.
Reusable blockContent blockA drag-and-drop chunk of an email: text, image or button. Blocks are per-email, there is no library of saved reusable blocks.
TemplateEmail templateA saved design reused as the starting layout for new emails.
Personalisation languageMerge tagsPlaceholder codes written as *|FNAME|* that swap in each contact’s data.
Fallback valueDefault merge tag valueThe stand-in text when a contact has no value stored, set per audience field.
A/B testA/B test (and Multivariate)Sends competing versions to portions of your audience, then the winner to the rest.
SuppressionImported unsubscribesPeople marked unsubscribed can never receive marketing email. There is no separate suppression list, you import addresses as unsubscribes.
TransactionalMailchimp Transactional (Mandrill)A separate paid add-on for receipts and password resets, triggered by your app. Billed and managed separately from your marketing plan.
Preference centreUpdate profile formA hosted page, linked with *|UPDATE_PROFILE|*, where contacts edit details and group choices.
Send-time optimisationSend Time OptimizationPicks a likely-best send time within 24 hours of your chosen date. Works on one-off emails only, not automated emails.
ReportingReportsOpens, clicks, bounces, unsubscribes and revenue per email or automation.
API-triggered sendTransactional API sendThe Transactional API triggers a send from your code. Marketing API webhooks push data out, they do not trigger an email.
Draft vs liveDraft / Active / PausedA flow is Draft until activated; pause an Active flow before editing.

What we couldn't confirm

We only list what Mailchimp's documentation says. These points weren't clear from it, so test them in your account:

  • A per-field default merge value exists (glossary), but no inline default syntax for *|FNAME|* was found, so the fallback uses IF/ELSE.
Do it in Mailfois. Ask Mailfois, your email marketing assistant, writes modules and whole templates for Mailchimp with these tags, fallbacks and editable regions already in place. Studio adds the unsubscribe and privacy links before you copy the code, and Brand Guard flags merge tags left without a fallback. How Ask Mailfois works

Questions

What is the unsubscribe tag in Mailchimp?

*|UNSUB|*. *|UNSUB|* is required in every campaign.

How do I add a first name with a fallback in Mailchimp?

Mailchimp uses Merge tags. A first name is *|FNAME|*, and with a fallback: *|IF:FNAME|*Hi *|FNAME|*,*|ELSE:|*Hi there,*|END:IF|*

How do I add a view-in-browser link in Mailchimp?

Use *|ARCHIVE|*.

How do I get a custom HTML email into Mailchimp?

Campaigns > Email templates > Code your own: paste the code, import an HTML file, or import a ZIP (one HTML file, images in the root). Images in a ZIP are uploaded to Content Studio and given absolute paths.

Sources

Checked by Mailfois against Mailchimp's documentation on 27 October 2026. Platforms rename things often: spotted something out of date? Email [email protected].

Other platforms

Klaviyo · HubSpot Marketing Hub · Salesforce Marketing Cloud Engagement · Braze · Adobe Marketo Engage · Bloomreach Engagement · Brevo · Constant Contact · Campaign Monitor · Dotdigital · Iterable · Resend

Code for Mailchimp without looking up the tags.

Start with Ask Mailfois