Every email campaign sent through MailChimp is required by law to include an unsubscribe link. To help you remain compliant, our *|UNSUB|* merge tag automatically generates the link for you. Most MailChimp templates include this merge tag by default, but sometimes you may need to add one manually.
In this article, you'll learn how to add an unsubscribe link to any editable text area in your email campaign.
Before You Start
- To learn more about how unsubscribes work in MailChimp, check out About Unsubscribes.
- If our system doesn’t detect an *|UNSUB|* merge tag in your campaign, we’ll add a footer that includes it. To learn more, check out Customize Your Footer Content: Troubleshooting the Extra Footer.
Insert in Source Code
If you're comfortable working in the source code of a MailChimp campaign, you can insert the unsubscribe link directly into the HTML of an editable area.
To insert the unsubscribe link directly into the HTML of an editable area, follow these steps.
- In the Content section of the Campaign Builder, click Edit Design.
- Click anywhere in a text content block to edit it.
- Click the < >** source icon**.
Add the following code where you want your unsubscribe link to appear:
<a href="*|UNSUB|*">Unsubscribe from this list.</a>
Click the < > source icon again.
- Click Save & Close.
Insert in Custom Code
You can still add the unsubscribe merge tag in a custom-coded a template or campaign. Copy and paste the following code anywhere you want the link to appear.
<a href="*|UNSUB|*">Unsubscribe from this list.</ a>
Insert in Plain-Text Campaign
For a plain-text campaign, type the merge tag in as regular text, like the example below. After you send your campaign, the tag will be replaced with the URL to your MailChimp-hosted unsubscribe form.
Unsubscribe from this list: *|UNSUB|*
Merge tags only work when campaigns are sent. While a campaign is in draft or paused mode, you'll continue to see the tag itself. Learn how to preview and test merge tags.
Troubleshoot the Unsubscribe Tag
If MailChimp doesn't recognize an *|UNSUB|* tag you've inserted, here are a few things to check.
- Are you using your own unsubscribe link? If so, the system will not recognize it. We require that our own unsubscribe merge tag be used: *|UNSUB|*. If you are using your own HTML, you can use the code in the Insert in Custom Code section of this article.
- Do you have comments in your html? A comments tag left open will cause the system to not see your UNSUB tag.
- Did you use Word to create the content in your email campaign? The junk code Word pulls into the background of your campaign can interfere with our processing the unsubscribe tag. If you originally used Word, remove the junk code to remove any HTML code that interfers with the merge tag.