Goal is an optional campaign feature that tracks subscriber activity on your website, and can be used to trigger Automation workflows or to create targeted segments for new campaigns. For more information visit mailchimp's full documentation.

 

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


To enable Goal and add the JavaScript tracking snippet to your website, follow these steps.


  1. Click your profile name to expand the Account Panel and choose Account.

  2. Click Integrations.

  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 want 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.


After you've embedded the Goal tracking code, 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 these steps.


  1. Navigate to the Setup step of the Campaign Builder.

  2. In the Tracking section, check the box for Goal tracking.
    Macintosh HD:private:var:folders:_0:gjnfww511cdbnm1htgw6hw_r0000gn:T:TemporaryItems:camp_cb_goalcheckbox.jpg


  1. Continue through the Campaign Builder, and send the campaign to your list.


Goal Automation Triggers

If you have set up Goal tracking on your website, you can use subscriber Goal activity as a trigger for Automation workflows. You can trigger workflows with hits to specific URLs or JavaScript events. To add more flexibility to your triggers, wildcard characters can be used in both URLs and events. Both events and URLs must be 255 characters or less.


To create an Automation workflow based on a Goal URL, follow these steps.


  1. On the List and Workflow step, choose the workflow type Website activity

        

  1. Fill in the Workflow configuration fields and click Next.

  2. Click Goal tracking under the Tracking heading if you want to track website activity from these automated emails. Click Next.

  3. On the Trigger step, type a target URL in the Trigger workflow when the following conditions are met field.

  1. Continue through the Campaign Builder, and send the campaign to your list.


Advanced Trigger Options

JavaScript Events

A JavaScript event is an action on your website, like when someone signs up to your list or completes an e-commerce transaction. Using JavaScript events is considered an advanced feature and is recommended for users familiar with custom coding.


This example code shows a JavaScript event where the text "Test Event" is a link. JavaScript events must be 255 characters or less. 

Macintosh HD:Users:ChloeHall:Desktop:Screen Shot 2016-01-08 at 3.29.00 PM.png

If you use this JavaScript event as a trigger for your Automation workflow, any subscriber who clicks the link will start the workflow. 


Wildcards


To add flexibility to uncertain situations, Goal lets you add wildcard delimiters to your trigger URLs or JavaScript events. Wildcards stand in for possible characters that could appear in your URL or JavaScript event, to trigger workflows for subscribers who navigate to different versions of a URL or JavaScript event.

 

  • |?| allows for single character matching in a URL or JavaScript event. 
    In this example, the wildcard triggers a workflow for anyone who visits "us1.mydomain.com," "usa.mydomain.com," or another similar URL with one character difference. It does not trigger for URLs where the wildcard character is left blank (us.mydomain.com). 

 

 

  • |*| 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. In this example, the |*| allows blank-character matching to account for whether subscribers visit the http:// or https:// version of your website. 


Goal Segments


Segment with Goal activity to target subscribers who have completed specific actions on your site. After a subscriber clicks any Goal tracked link from a campaign or automated email, you'll be able to segment by that activity to send other targeted campaigns and automated emails. 


  • URL Segments
    To target subscribers who have navigated to certain URLs on a site, include the full URL or a portion of a URL to segment by. 


et segmenting options URL


  • JavaScript Event Segments
    To target subscribers who have completed a Javascript event, include the name of the Javascript event in the field, like 'SignupTestEvent' in the example above. 
    et segmenting options javascript


Wildcard delimiters cannot 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 embedded Goal tracking code.