Add a Table of Contents to a Campaign

This feature requires Manager user level or higher.

When you create a campaign in MailChimp, you can set up a table of contents in your design. A table of contents makes navigation inside your campaign easy for your subscribers.

Below, you'll learn two ways to add a table of contents to your email.

Use a Merge Tag

The *|MC:TOC|* merge tag generates a bulleted table of contents by pulling any text from your email that is formatted as a TOC Title or TOC heading style. Each item in the table of contents will link to that title in the campaign, so your subscribers can jump ahead to that content if their email program supports anchor links.

Add the Table of Contents Merge Tag

  1. Navigate to the Design step of the Campaign Builder.
  2. Click the text area where you'd like to add your table of contents.

    Edit content block

  3. Type the merge tag *|MC:TOC|* or select the tag from the Merge Tags drop-down menu in the toolbar.

    Table of contents tag

  4. Click Save & Close.

Format Content Titles in Editor

  1. Add and highlight the text you want to display as an item in the table of contents.
  2. Click the Styles drop-down menu on the editor toolbar.
  3. Select TOC Title or TOC heading.

    Table of contents styles

Format Content Titles in Custom Code

When you code your own HTML, add class="title" or class="mc-toc-title" to your HTML tags for any titles you want in the table of contents. For example, you might have tags in your HTML that look like one of the below.

<span class="title">
<h1 class="title">
<h2 class="title">
<div class="title">

Title and mc-toc-title are used interchangeably with H1 and H2 tags. These classes won't work correctly with other heading types, like H3 or H4.

Preview and Test

After you add your table of contents, preview and test the campaign to see how it will appear in the final send.

Campaign Preview with the table of contents created

If the table of contents doesn't appear in the preview or test send when using our *|MC:TOC|* tag, the text you're anchoring to may not be formatted with the TOC heading or TOC Title style. Check the text using the Styles drop-down menu or click the Source < > icon in the edit window to make sure the correct styles have been applied.

Table of contents styles

Troubleshooting

If you import your campaign from a URL, your anchor links may break. When you import your campaign from a URL, we insert a <base> tag into the imported HTML. This allows you to code the HTML just like you would usually, with relative URLs, images sources, and more. However, the <base> tag removes the ability for anchor tags to work.

If you know that you'll have full URLs in your content, add a blank base tag to your HTML code and we won't override it. Something like <base href=""> will work, because we add the base tag only if one doesn't exist.

Was this article helpful?
What can we do to improve your experience with articles like this?