Create a Mailchimp Template using Merge Fields

  • Updated

This article contains a practical example of how to deploy Distil's URL Identification Token feature using the popular email marketing tool Mailchimp. We’re going to assume your Distil account is set up, you've created a connection to Mailchimp, Distil Tracking has been added to your website pages, and you have successfully created a Destination to send Customer data to your Mailchimp account.

Step 1: Push the Distil Tracking ID into Mailchimp

The first step is to ensure you are pushing the Tracking ID Attribute from Distil into Mailchimp for each Customer in your Mailchimp Audience. Distil's URL Identification Token feature uses this Tracking ID to uniquely identify Customers and track their activity.

To check that the Tracking ID is included in the Destination, click Destinations in the left menu panel. Your existing Destinations are listed underneath Create Multi-Channel Audience. Click on the Destination you want to check.

After choosing a Destination to edit, you can edit the Destination's Attributes by selecting the Click to Edit button on the right side of the Destination Push section.

Edit Attributes.png

On the next page, select Choose Attributes to Sync.... In the pop-up list of Attributes, make sure that Tracking ID is selected, from within the Customer Core Data set.

Attributes v2.jpg

If the Tracking ID Attribute wasn't already selected, then click Sync Now at the top of the Destination page. Once the sync is complete, you can check that the Tracking ID Attribute has been pushed into Mailchimp by viewing the Customer Profile page. This should be a unique value per Customer.


Step 2: Add Tracking ID to URLs

The next step is to add this to all add the Tracking ID to all URLs in your Mailchimp templates that direct visitors to your site. First let’s see what the Merge Tag in Mailchimp is. 

You do this by selecting the Audience that you have pushed from Distil to Mailchimp, and finding the “Audience Fields and |*MERGE*| tags” menu option. 

This opens up the list of all the Attributes that are in this Audience. It should correspond pretty closely with the Attributes you selected to be pushed from into Mailchimp, with some standard Mailchimp additions. 

Against each Attribute you will see the corresponding Merge Tag and also a “Visible?” checkbox. 

The “Visible?” checkbox indicates if the Attribute should be shown to the Customer if they click through to unsubscribe or modify their Profile. We suggest unchecking Distil Hash and Tracking Id. These contain long strings of alpha-numeric characters and so are pretty meaningless to the Customer. 

The next column along contains the Mailchimp Merge Tag. This is the value you put into your Email Templates to merge the value held for the Customers into the email content. For common example is First Name or Last name - that’s pretty standard - but you can also use it to merge values into any bit of content or code within the template. For example we can append the Distil Tracking Id into Urls - and that’s what we’re going to do. 

Mailchimp has two names for each attribute, and you can use either. A User definable friendly name, and a fixed system one. You can see in the screenshot above for our Tracking Id attribute we have an option of URL_TRACK or MERGE19. 

To make life a little bit easier we have updated the system assigned name, which was D256 or similar, to URL_TRACK. We suggest you do the same, although you don’t have to. 

If you do, don’t forget to press Save Changes. Mailchimp doesn’t automatically remember things you do on this form! 


Step 3: Build a Template

Next we’re going to look at how to use this in a Mailchimp Template. Start by either creating a new template, or opening an existing one. 

For the purposes of this document we’re going to create a new template by selecting the Create option Mailchimp dashboard and choosing one of their default templates. 

The layout this gives us includes a Start Shopping button. In the normal course of events you would edit this URL to point to your website, and here is no different. However, as described in the URL Identification notes we’re also going to append the tracking URL Parameter and use the Mailchimp Merge feature to pull in the value from the Customers profile. 

As a reminder that means adding the parameter dtt=[VALUE] to the URL, either preceded with a ? or & depending on any other parameters you are using in your URL. 

To add a Mailchimp Merge you take the name of the Audience Merge field and surround it with *| |*. I.e. you precede the name with *| and close it of with |*. 

Earlier we changed the name of the merge field to URL_TRACK. So this becomes *|URL_TRACK|*

Therefore if we add dtt=*|URL_TRACK|* to our link (preceded by the correct ? or &) Mailchimp will replace this with the appropriate for each Customer when it sends the Campaign. 


By the way, if you need a bit more guidance on whether to use a ? or & our friends at SEMRush have an excellent article explaining the concept here >

Repeat this step for all URLs that direct to your website in the template.

Step 4: Preview the Merge

That’s it all set up, but of course you want to check your work before sending it to all your Customers. 

To do this let’s create a Mailchimp Campaign using this Template. Choose the Create campaign option and select the Audience being pushed to Mailchimp by Distil as your target. 

Next we want to get into the Content Editor so we can see our Template again. To do this click the Edit button in the Content section. 

This will bring the Content Editor

To make sure our Attributes are correctly merging into the templates we want to preview how this will look for each Customer. Select the Preview option and then Enter preview mode.

This will show our email as it will be delivered to our Customers. If you hover your mouse cursor over any of the links you have configured you will see in the bottom of the browser a tooltip appear that shows the URL they will be taken to. 

Notice here how our Merge field has been replaced with dtt=<<Test Tracking Id>>. 

This is obviously not what we want to send, but it has this value because we haven’t yet enabled merging an actual Customer record into the template. 

To enable this flick the Enable live merge info option on. This will bring up the first Customer in your audience list and run any Merges you have added to your Template. 

Now when you move the cursor over the button the correct, and unique, value for the selected Customer should be in place. 

Using the Next and Previous arrow buttons you can scroll through your Customer list and see this value update. 

So that’s it. This URL is now configured to trigger URL Identification of the Customer. When this Customer clicks this link their browsing behaviour will be tracked as they view Content on your site. This means that the A.I. Tools, personalisation, attribution will be activated.

Further information

Using Merge Tags is inescapable when creating personalised content not only in Mailchimp, but any Email Marketing tool that enables you to build your own templates. And you can get pretty sophisticated in using them so that each recipient has their own completely unique and personalised email. That’s the way to get fantastic engagement from your email list and seriously boost open and click-through rates, ultimately increasing your revenue and retention. 


Next Steps

We further explore this concept in our Mailchimp and Personalisation video.

Was this article helpful?



Article is closed for comments.

Still have questions?

Contact us