Jun 3, 2014

Adding Goal Tracking to Your WordPress Site

If you’re new to MailChimp (10,000 people sign up a day, so there are a lot of you!), you may have missed it back in October when we debuted Goal, one of our new tracking features. Goal (available for paid accounts) allows you to see which pages your subscribers visit on your website, so you can send them automated follow-up emails based on those specific page views and segment your list to find your most engaged subscribers. For instance: Our Knowledge Base team uses Goal to send campaigns to subscribers when they finish watching a KB video. It’s a good way to send specialized content without needing a programming guru.

WordPress users looking to use Goal may have run into some difficulties, though. Given WordPress’s footprint of more than 74 million sites, and the fact that our subscribe plugin is approaching 750,000 installs, it’s safe to assume that’s more than a few of you. Maybe you’ve noticed that switching, modifying, or upgrading WordPress themes wipes out site-specific customizations you’ve added along the way, like Goal tracking codes. Or maybe you want to use Goal’s tracking features, but don’t want to meddle with the code in WordPress.

Well, fret no more. We built MailChimp Goal for WordPress plugin with you in mind, with hopes of making your experience a little easier. Once it’s installed, the plugin will automatically add Goal tracking to each of your user-facing pages. And, since Goal tracking is added separately from your theme, switching or upgrading themes should work without a hitch.

Here’s how to get started.

Enable Goal in your MailChimp account

Before you’ll be able to use the plugin, you need to enable the Goal integration within your MailChimp account.

  1. Click your profile name to expand the Account Panel, then choose Account Settings.
  2. Click the Extras menu, and choose Integrations.
  3. Under the Goal heading, click Enable.

 

goalenabled

With Goal enabled, installing and configuring the plugin is pretty simple. First, install the plugin, either through the plugins directory by searching for "MailChimp Goal" or by following the installation instructions. Once installed, MailChimp Goal will be added as a submenu in your Settings tab.

 

settingsmenu

To connect your MailChimp account, create and label a MailChimp API Key and copy/paste the key on the MailChimp Goal Setup page.

 

apikey

Once we connect, you’re good to go! Goal tracking will automatically be added to all public-facing pages (excluding admin pages) on your WordPress site.

 

goaldashboard

Behind the scenes

If you’re interested in the technical details, it’s a straightforward process that only needs to make one API call to your account.

When we have an API key with the proper permissions (a user with an Owner or Admin role), we’ll make a a helper/account-details API call to grab a hashed user ID and store it in WordPress’s database. After we’ve grabbed that information, we plug it into the boilerplate Goal tracking code, and append it to your theme’s Header.php file. That’s it! Once set up, there’s no need to re-add the code every time you update or change your site’s theme.

Looking for other plugins?

Looking for more MailChimp functionality for WordPress? Check out the array of plugins that can help you grow your email list, send emails through a Mandrill account, or learn from analytics about how your MailChimp campaigns and blog posts affect traffic to your site.

  • MailChimp List Subscribe: An easy way to add a single MailChimp signup form to your WordPress page.
  • WPMandrill: Send all of your WordPress emails through Mandrill, automatically. You can even track opens and clicks right from your WordPress dashboard.
  • Analytics360: Analytics360 connects your Google Analytics account, MailChimp account, and blog all into one easy-to-read dashboard. Email campaigns and blog post dates are automatically plotted to show their affect on the traffic driven to your site.
  • Gravity Forms MailChimp Add-On: One of the more popular WordPress form plugins, Gravity Forms connects WordPress and your MailChimp accounts for easily collecting email signups. Gravity Forms is a paid plugin, but offers priority support should you need it.
  • MailChimp for WordPress: A recent addition to the Integrations Directory, MailChimp for WordPress is a very popular third party plugin that has gotten lots of love.