How do I use link tracking with Google Analytics?

Our Google Analytics integration makes it easy to add tracking links to your campaigns. With the integration, you can see exactly what visitors do on your website after clicking a link from your campaign. You can use Google Analytics to track the conversion of your campaign, see the path contacts take through your website, and optimise your website content. We recommend using it so you have a way to measure the effectiveness of your campaigns alongside the click-through rate.

In this article, we will discuss the following topics:

Setting up Google Analytics

Before enabling Google Analytics in a campaign or automation email, you need to have the Google Analytics tracking code installed on your website. For more information on how to install this on your website, you can view Google's documentation.

Google Analytics is set up per campaign or automation emails. When you enable Google Analytics, the system will automatically add Google Analytics utm URL parameters to your hyperlinks.

In the summary of the campaign or automation email, you will see the option to enable Google Analytics. By turning the switch to 'ON', you enable Google Analytics for the selected email.


Next, you will see a pop-up window asking you to enter the 'Google Analytics campaign name'. Enter the desired 'Google Analytics campaign name' in the designated field and click 'Done'. The name you enter will also be the name that appears in Google Analytics under 'Acquisition' > 'Campaigns'.


MailBlue adds a tracking URL to all hyperlinks in your campaign, informing Google Analytics when a contact clicks on a link in the selected campaign or automation emails.

In your Google Analytics reports, you will find the following:

  • The utm_sources: this is who sent the email. When you have ActiveCampaign branding enabled, 'ActiveCampaign' will be displayed. If you have disabled ActiveCampaign branding, 'Newsletter' will be displayed instead. For information on enabling and disabling this branding, see the following article.
  • The utm_medium: this is the marketing channel used. In this case, it will be 'email'.
  • The utm_campaign: this is the name of the campaign you specified when enabling Google Analytics in the campaign summary.
  • The utm_content: this will be the subject line of your email.

Please note: it may take more than 24 hours for the Google Analytics data to be updated. Therefore, data may not immediately appear in your reports when you send a campaign.

The difference between MailBlue click reports and Google Analytics sessions

Google Analytics sessions and clicks in your MailBlue campaign are tracked in different ways. You can read about the differences here.

How are click reports tracked in MailBlue?

When a contact clicks on a link in your campaign or automation email and link tracking is activated, the system immediately redirects those contacts to one of our link tracking domains and then forwards the contacts to the intended URL. When a contact lands on one of these link tracking domains, it is recorded in our system as a link click. Contacts themselves will not experience that they are on an 'intermediate domain' (the link tracking domain). The statistics of these clicks are available to you in your reports.

How is a Google Analytics session recorded?

A session in Google Analytics is a group of interactions (page views, events, social interactions, transactions, etc.) that occur on your website within a certain time frame. A single contact can have multiple sessions, and a session can expire after 30 minutes of inactivity.

In Google Analytics, several things happen before a session is ultimately loaded:

  • When a click occurs in the campaign, the browser is redirected to your landing page.
  • Your website then responds to this request and begins transferring data from the web server to the contact's browser.
  • When the browser starts downloading the landing page, there may be multiple requests for files simultaneously. This includes JavaScript, CSS, images, video, audio, and more. The requests for JavaScript include the Google Analytics tracking code.
  • The contact's browser and security settings must support cookies, JavaScript, and images.
    Please note: if any of these are disabled, Google Analytics may not be able to record a session. 
  • The contact's browser then sends a separate request to the Google Analytics servers.
  • The session is then recorded.


Reporting Differences Between MailBlue and Google Analytics

Differences between link clicks in campaign reports and Google Analytics sessions are common. Link clicks and Google Analytics sessions will rarely match. There are several scenarios that can cause this. Some are listed below:

  • The contact clicked on a link in your email multiple times during the same Google Analytics session. Your campaign report will show multiple link clicks and Google Analytics will show one session. 
  • The contact clicked on a link in your email once and was redirected to your website. The contact then remained inactive on your site for more than 30 minutes. After 30 minutes, the contact returns and engages with your website. Your campaign report will show one link click and Google Analytics will show two sessions.
  • The contact clicked on a link in your email once and closed their browser before the page and Google Analytics had a chance to load. Your campaign report will show one link click and Google Analytics will not track a session. 
  • You tested the URL/email link before sending the email to your contacts. Google Analytics will include these tests in their sessions. In this case, the numbers in Google Analytics may be higher than what you see for clicks in your MailBlue campaign report.
  • The Google Analytics tracking code is not correctly added to your site, or contacts are going to pages where Google Analytics is not installed. In this case, your campaign reports will show link clicks and Google Analytics will not show sessions.

Please note: differences between link clicks and users or visitors in Google Analytics also commonly occur for the same reasons as mentioned above.


What should I do when there is a large discrepancy between the reports?

If you are experiencing a significant difference between the MailBlue click report and your Google Analytics sessions, our support team can assist you in troubleshooting by checking whether the Google Analytics utm URL parameters are being added to your campaign links. However, you may need to contact Google Analytics to resolve the issue.

For more detailed information on tracking campaigns with Google Analytics, you can refer to Google's documentation on that topic in the help environment of Google Analytics.

Was this article helpful?
0 out of 0 found this helpful