Track clicked links with Google Analytics
If you have a Google Analytics account set up for your website, you can track incoming traffic from email campaigns sent.
After you follow the instructions below to set it up, all new campaigns you send will automatically have Google Analytics tags appended to links for the domains you want to track.
Important: Only new email campaigns and automated journeys created after you enable the Google Analytics integration will have links tagged for tracking. Draft campaigns and existing journey emails must be re-saved or re-imported for tracking to take effect.
Setting up Google Analytics tracking
To enable this setting, you need a Google Analytics account linked to your website by a custom tracking code. When completed, just follow these instructions:
Click Clients in the top navigation, then select the client you want to enable Google Analytics for. Click Client settings near the top right and click Analytics tracking settings in the right sidebar. Select Enable Google Analytics integration,then enter the domain, or domains, you want to track, as shown here:
The "Campaign Source" section is optional. If you are tracking multiple online marketing campaigns in Google Analytics, you could use this to apply a term that's more specific than "email".
We auto-tag all Google Analytics-tracked links with utm_medium=email. This is explained in more detail below.
When you are done, click Save analytics settings.
Email link tracking tags
A Google Analytics campaign tracking link consists of a URL for the web page you're linking to, followed by a question mark and UTM parameters to identify things like source, medium and campaign name.
We use the utm_parameters like this:
- utm_medium = email
- utm_campaign = the email campaign name (not subject line)
- utm_content = the email campaign name plus a unique campaign identifier (CID) that can be used with our API
- utm_source = only included if you supply a source term
- utm_term = the link text, or alt attribute (for images)
For example, let's say the Widget Factory sends a campaign with the campaign name: Widget Factory Annual Clearance Sale. The domain they're tracking is widgetfactory.com and their campaign contains this link:
<a href="http://widgetfactory.com/store/red-widget ">Buy a red widget</a>
When clicked, the tagged version of that link would look something like this in a web browser address bar:
If we separate the parameters from the URL above, you can see it consists of:
- utm_medium = email
- utm_campaign = Widget Factory Annual Clearance Sale
- utm_content = Widget Factory Annual Clearance Sale +CID_2cagbf4589bc1df30fe09ac7fbce5356
- utm_source = Email newsletter software
- utm_term = Buy a red widget
Tracking individual links by keyword
The keyword used to identify each link is automatically generated; it becomes the utm_term tag in the URL. For text-based links we use the link text, so the keyword for "Buy a red widget" becomes
If it's an image, we use the alt attribute for that image. Or, you can overwrite both of these by manually adding the keyword as a title to the link, for example:
<a href="http://www.yoursite.com/page.html" title="keyword">This is the link text</a>
Refresh existing emails to enable tracking
To apply Google Analytics tracking tags to draft campaigns or active journey emails, you need to "refresh" the email content for tags to be appended, as explained below.
Draft email campaigns
If you have any draft or scheduled (to send later) campaigns, you will need to refresh them in one of two ways:
- Template-based campaigns — If the campaign was created with one of your saved templates, open it with the content editor and make a change, then save the change.
- Imported campaigns — If you imported a complete HTML campaign from your computer or a web address, refresh it by navigating to the campaign snapshot and updating the HTML with our in-app editor.
Note: If the campaign is a final draft and you don't need to edit anything, just make a "pretend" change, for example: close a space between two words then put the space back in. This also applies to refreshing journey emails, as explained below.
To activate the tracking tags for emails in a journey, open Automation and click the title of the journey to open it. Click the email you want to refresh, then in the settings panel click click Edit email content, as shown here:
The journey email, or emails, will need to be refreshed in one of two ways:
- Template-based emails — If the email was created with one of your saved templates, open it with the content editor and make a change, then save the change.
- Imported emails — If you imported a complete journey email from your computer or a web address, the only way to refresh it is by importing the email again. You can't update the HTML with our in-app editor.
What does UTM mean?
UTM stands for Urchin Tracking Module. In 2005 Google purchased Urchin and rebranded it Google Analytics.
How will I know if my campaign links have been tagged before I send?
When Google Analytics integration is enabled, you will see confirmation messages that look like this:
The example above is from a campaign snapshot; the page you see before sending or scheduling a new campaign. It's also shown when you import a complete HTML email, designed externally.
Note: The confirmation message is not shown when you create journeys but, if tracking is enabled for the client, links in journey emails that match the specified domains will be tagged.
Can I track my email campaigns using different values for the utm_ parameters?
Absolutely, you just have to generate the tagged URLs manually and either add them to your campaign source code (if it's an imported campaign designed externally), or use the insert hyperlink button in the email editor, as shown here:
If you have already enabled Google Analytics integration, under Client settings, you will need to turn it off first.
Tip: The Google Analytics URL Builder is a handy tool for generating tagged links to use within your email campaigns.