16 Apr 2014

How To Optimize Email Acquisition Ads: See What Converts Best Without Leaving Mailchimp

Wouldn’t it be nice if you didn’t have to go to your analytics to see which email acquisition campaigns and sources converted, and what the subscribers did afterwards? With Mailchimp you can… but most people don’t know how. So let me show you how I did it.


Step 1: Open Mailchimp’s List fields and Merge tags page.

It’s found under Settings, when you’re in the Lists tab (third down on the left).

Mailchimp's list fields (aka merge tags) feature is really powerful for conversion rate optimization. It's found under "Settings," within the Lists Tab.

Mailchimp’s list fields (aka merge tags) feature is really powerful for conversion rate optimization. It’s found under “Settings,” within the Lists Tab.

Add fields for the marketing variables you want to track. For me those are source, campaign, ad (ad group would be relevant for Facebook or search advertisers), and landing page, abbreviated as LP. Depending on your marketing channels, you’ll likely want to include other variables, such as offer, bid type, operating system (especially for mobile), location, day part, call to action etc. My offers equate to my landing pages, hence I don’t have it separate.

Don’t make these fields required, nor visible.

If they were required, you would sometimes get errors that confuse visitors. Suppose human error crept into your work and the field was left blank. The visitor submitting the form will get an error, and be taken to a Mailchimp form where suddenly they need to enter the data here but have no clue what to enter. They can then either make it up (possible if your offer is really compelling and they don’t mind dirtying your marketing data to get the offer), or will just be puzzled and quit without converting.

I assume you still want the conversion, even if it’s lacking tracking data. Otherwise feel free to aggravate visitors…

This is also why the fields shouldn’t be visible.


Step 2: Create hidden fields in your forms that correspond to each marketing variable you want to track.

Here’s sample code:

< !– source — > < input id=”MERGE6″ type=”hidden” name=”MERGE6″ value=”**wherethemagichappens**” / >

Note that the merge field id has to be identical to the merge field tag in your mailchimp backend. If it’s called MERGE6 in Mailchimp – Mailchimp gives these fields MERGE1, MERGE2… as default names – it better be called that in your form or you’ll be sending data into oblivion. Trust me, I made this mistake :D.

At this point you can go lo-tech, hi-fidelity and just manually enter the values for the form (where I wrote **wherethemagichappens**). This prevents things breaking.

Suppose you want to use the same landing page for a few different sources (that therefore have different campaign names, ad groups, ads, targeting options…), this option would require you to make dozens of landing pages – one per variation. That’s a big pain in the tuchus, so only use this when starting out at small scale.

Once you’re successful with the campaign and want to scale it, you’ll need to make the values enter dynamically. Here’s how:


Step 3: Enter marketing variables into hidden fields – dynamically.

(Dynamically means “automagically” to you who speak interwebz parlance.)

Write a little php script there that parses the URL for your marketing variables and enters the appropriate one in each hidden field.

Let’s suppose your URL looks like this: martialarts.com/landing-page.php?source=imninjas&campaign=midnightattack

Then your PHP script looks like this:

< ?php if(isset($_GET['source'])) {echo htmlspecialchars($_GET['source']);} else {echo ‘the-alarm-is-ringing-cuz-you-forgot-tracking—hire-a-ninja-next-time';} ? >

You wrap that between the double-quotation marks for the value attribute of the input field. E.g.:

value=”< ?php if(isset($_GET['source'])) {echo htmlspecialchars($_GET['source']);} else {echo ‘the-alarm-is-ringing-cuz-you-forgot-tracking—hire-a-ninja-next-time';} ? >”

Let’s translate that into plain English. If the URL has a value for the attribute source (in other words, if the big box called $_GET has a value set (isset) for the name source), then write html that equates to the value of source.

Note that it uses the htmlspecialchars function, which is built into PHP. This prevents some jerk from injecting code into your page by editing the URL to read, e.g. source=, and then reloading the page.

The end result in the case above would be value=”imninjas”. When the form is submitted, you end up with a subscriber who has a value for the source field associated with them in your list, and that value reads imninjas.

Here’s what it looks like with my soccer drills site.

Mailchimp list with marketing variables populated alongside subscribers' emails and names.

Mailchimp list with marketing variables populated alongside subscribers’ emails and names. Hire IMN if you want to build a list of significant size, while tracking progress closely.


The end result: You can see which campaigns and sources are generating leads for you within your Mailchimp list.

To analyze which ones are converting best, you have to use a basic assumption: each competing variation got an equal amount of traffic. So if you ran two ads on Facebook, they both got about 500 clicks, for example. Or if you were split-testing landing pages, you were rotating them equally (not randomly).

Assuming that’s true, then you just need to search which got you more conversions by going to Manage Subscribers -> View Subscribers -> Segments: New Segment -> and entering your criteria, such as “campaign is midnightspecialoffer.” That’s not a big deal, considering it takes 15 seconds and you’d have roughly the same amount of work within Google Analytics.

The preview segment within mailchimp can tell you how many people correspond to a  particular value for your marketing variable field. E.g. 301 subscribers for the landing page 'perm-redirect'.

The preview segment within mailchimp can tell you how many people correspond to a particular value for your marketing variable field. E.g. 301 subscribers for the landing page ‘Permanent-Red’.

That said, there’s obviously a downside here that you can’t rank variations all at once – you’ll need to get the data manually. The solution in this case is to export to Excel… but that obviously defeats our goal of staying within Mailchimp. Perhaps someone who wants to build a business around email marketing analytics will create this tool.

Now it’s all well and good to see that source A generated more email leads than source B. The better question is which one generates the most money, at the end of the day. Until this point, I’ve done all the things in the tutorial. The next step should work in theory, but I admit to not having tested it yet.


Bonus Step: Add conversion fields to your list.

Like we did previously, add the relevant fields to your list. For example, an ecommerce shop might use ‘purchases,’ average order value, profit, as well as what emails generated sales.

When the visitor clicks through from the email and converts, your checkout form hooks back to mailchimp and sends in the conversion data.

You could do this custom as described here… or basically get the same conversion data and segmentation ability with Mailchimp’s Ecommerce360 feature.

Tl;dr ?

To summarize, create custom fields in your list according to your marketing campaign variables, e.g. source, campaign, ad, landing page, offer, gender, age etc. Add hidden inputs to your subscription form, and populate the fields dynamically with a little PHP and custom-built URLs. Then login to Mailchimp and check your segments to see which variation converted better.