Integrate Goal With MailChimp

This feature requires Manager user level or higher and is part of paid features.

Goal is an optional campaign tracking feature available for paid accounts that lets you trigger Automation workflows based on subscriber activity from your automated emails to your website. The Goal integration can also be used to create segments that target subscribers based on their Goal activity. 

Below, you'll learn how to enable Goal for your account and how you can use Goal tracking information to engage your subscribers.

How Goal Works

MailChimp stores a web cookie in a subscriber's browser when they click from a Goal-enabled campaign to a webpage with the Goal tracking snippet installed. The cookie assigns a unique ID to the subscriber and is present for one year or until that subscriber clears the cookies from their browser. Anytime the subscriber returns to your website, the cookie is referenced to track their activity on your site even if the subscriber doesn't click from a MailChimp campaign.

If a subscriber visits your site from another browser or device without clicking through from a Goal-enabled campaign, that subscriber's activity will not be tracked by Goal.

Subscribers can enable privacy settings in their browser to restrict tracking cookies. Because we respect do-not-track privacy settings, these subscribers may show open and click activity, but will not have Goal activity.

Set Up the Goal Integration

Follow the steps below to enable Goal and add the JavaScript tracking snippet to your website.

  1. Click your profile name to expand the Account Panel and choose Account.
  2. Click the Integrations option.
  3. Click Goal to expand the integration options.
  4. Click the Enable button.
  5. Copy the Goal tracking code we provide and place it at the bottom of the <head> section of every page on your website you wish to track. If your website uses a template, place the code snippet in the <head> of the template to add Goal tracking to all pages on your site.

Once in place, you can add Goal tracking to campaigns or use the Website activity Automation workflow type to segment on Goal data.

Add Goal Tracking to a Campaign

To add Goal tracking to a campaign, follow the steps below.

  1. Navigate to the Setup step of the Campaign Builder.
  2. In the Tracking section, check the box for Goal tracking.

    goal tracking checkbox

  3. Continue with the campaign-building process, then send the campaign to your list.

Goal Automation Triggers

You can set up a Goal trigger for an Automation workflow and further segment your target subscribers, if needed. Goal triggers can be specific URLs or JavaScript events. Wildcard characters can be used with both URLs and JavaScript events to add more flexibility to your automation triggers.

Follow the steps below to create an Automation workflow based on Goal trigger events.

  1. On the List and Workflow step, choose the workflow type Website activity.
    Website activity workflow
  2. Fill in the Workflow configuration fields and click Next.
  3. Click Goal tracking under the Tracking heading if you want to track website activity from these automated emails. Click Next.
  4. On the Trigger step, input a target URL below the Trigger workflow when the following conditions are met heading.
    Build workflow set up
    Click the Add segmentation conditions box to open more segmentation options. To send emails to subscribers who visited your target URL already, check the Send first email immediately to subscribers who meet these criteria box. Click Save to continue.
  5. Build your Automation workflow and emails as usual. Preview and test your emails and click Start Workflow to activate it.

Advanced Trigger Options

JavaScript Events

Automation workflows that are triggered by JavaScript events is a little more advanced than Goal's other features and will require an experienced developer to implement properly. Workflows that trigger from JavaScript events let you follow up with a subscriber after they complete a specific action on your site, like submitting an information form or completing an e-commerce transaction on your site.

The code below is one example of how a JavaScript event could look in your website's code:

When viewed in a typical browser, this code would show Test Event as a link. If this JavaScript event was used as a trigger, each subscriber who clicks the Test Event link will receive the workflow.


Goal lets you add wildcard delimiters to your trigger URLs or JavaScript events. Wildcard delimiters stand in for possible characters that could be populated in your URL or JavaScript event, so Automation workflows can be triggered trigger for subscribers who navigate to different versions of a URL or JavaScript event.

  • |?| allows for single character matching in a URL or JavaScript event. For example, if you wanted to trigger an Automation workflow to send to any subscriber who made it to one of the possible pages that had only a single character difference, you would enter the URL like this:

This would trigger the workflow to send to subscribers who landed on subdomains of that start with us. A |?| wildcard delimiter can't trigger a workflow if it's left blank. A character must be present for the |?| wildcard to trigger the workflow.

  • |*| allows for multiple character matching in a URL or JavaScript event as well as blank-character matching. Use the |*| character wildcard if you want to target subscribers who visit specific sections of your site. For example:

This would include anyone who visited either the http or https version of your site, rather than just a specific one.

Goal Segments

Segment with Goal activity to target subscribers who have completed specific actions on your site. Subscribers can only be targeted if they have previously clicked a link from campaign or automated email with Goal tracking enabled and directs to a site where the Goal tracking code snippet is embedded.

  • URL Segments
    Target subscribers who have navigated to certain URL's on a site. Include the full URL or a portion of a URL to segment by.
    Set segmenting options URL

  • JavaScript Event Segments
    Target subscribers who have completed a Javascript event. Include the name of the Javascript event in the field. For example, if you wanted to target subscribers who completed a JavaScript event on your site named signup, type signup in the segmenting field.
    Set segmenting options javascript

    Wildcard delimiters can not be used in Goal segmenting. To target subscribers that clicked wildcard links in your campaign, use the contains segmenting option and include the portion of the URL you'd like to target with your segment.

  • Goal Last Visited
    This option lets you use Goal activity to target subscribers based on when they last visited a website with your Goal tracking script installed.
    Goal last visited criteria

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

Technical Support