Learn how to use Google Analytics with your email campaigns.
Overview
Using Google Analytics with Dotdigital doesn't have to be a daunting process. This article is designed to be your one-stop for using Google Analytics with Dotdigital.
Let's start by explaining how to automatically add tracking code to your campaigns' link URLs. If you want to track where your traffic comes from and your website has that capability, then you can automatically have our system add a query string to links such as ?Ref=email
Link tracking can be custom tracking code, or it can be Google Analytics tracking code, or you can edit and customise Google Analytics tracking values.
Tracking code allows you to gather valuable information on how your links are being used and how effective they are. Any Google Analytics data can also be pulled through into the Dotdigital's analytics area.
All in all, adding tracking code to your links provides you with better site analytics.
Information
Google Analytics tracking is case sensitive. If you have a role set up in Google Analytics to convert UTM parameters to lower case characters, you won't see the results in Dotdigital Google Analytics reporting.
How do I add a generic link tracking code?
You can do so via Site analytics, simply by going to Email Campaigns > Advanced features and then select the Site analytics tab.
To add a single generic query string to your outbound links (using analytics other than Google), click Add new under 'Link tracking'. The 'Link tracking' window will open, enabling you to enter the link tracking field and the value you require.
For example, setting the field as 'Ref' and the value as 'email' will generate the following:
http://www.example.com/?Ref=email
How do I add personalisation to tracking code values?
To add contact data field personalisation to values, you can do so by clicking on the personalisation icon.
This means a contact-specific value can be added into the link tracking code.
For example, if you set the field as 'country' and select the contact data field 'COUNTRY' from the personalisation dropdown, you will generate the following:
http://www.example.com/?country=@COUNTRY@
Thus, if 'England' is stored against the contact's 'COUNTRY' contact data field, England will be added to the tracking code in place of @COUNTRY@.
You may also tick the 'Remove unsafe characters' box. By ticking the box, it will remove characters that are deemed unsafe, so your tracking parameters are not removed by website security profiles.
Once happy with your new string, click on Save.
It will then appear under 'Link tracking', which is where all your link tracking query strings will be listed.
From here you can delete and edit your link tracking query strings at any time.
Please note
When adding, removing or updating link tracking query strings and their values, changes will only take effect for existing campaigns once the campaigns are modified and re-saved. New campaigns that are subsequently created will have these values automatically applied, however. You will also be reminded of this within the application after having made the change.
How do I add a Google Analytics tracking code?
To enable Google-friendly links, click the Google Analytics Tracking button positioned to the right. A window will appear to confirm the field and values you're adding:
Clicking Continue will add these under 'Link tracking'. By doing this, you will have automatically added the following to your links:
- utm_campaign=Your campaign name - noting which campaign it was that referred the user to the site
- utm_medium=email - noting the medium by which someone arrived on the site
- utm_source=Your company name - noting the name of the company referring the visitor to the site; this is the company name as set under the 'Company details' section at the top of the 'Billing details' tab in your 'Accounts' area.
As with generic link tracking code, you can also delete and edit (see below) Google Analytics tracking code.
We recommend making sure that you add names to your links when creating your campaign. This will mean you should be able to find them in your Google Analytics dashboard reports by navigating to Acquisition > Campaigns > All Campaigns, selecting the campaign you're interested in, and then add a 'Secondary dimension' of 'Ad Content'. This will add an 'Ad Content' column that will show all the sessions that came in via those named links.
Again, remember to modify and re-save any existing campaigns for any changes to take effect.
How do I customise the Google Analytics tracking values?
If you don't want to use our default values for Google Analytics tracking, you have the ability to customise them by clicking Edit alongside the value you want to change.
For instance, you might want to customise a couple of the values as follows:
- utm_medium=MyEmailMarketingProvider - the name of your email marketing provider/medium, so that will be us!
- utm_source=email marketing
Clicking on Edit will open the 'Link tracking' window, allowing you to enter your own value in the 'Value' field. Again, you can use the personalisation function for contact-specific values.
Click Save to confirm any changes made and, once again, remember to modify and re-save any existing campaigns for any changes to take effect.
Be aware when customising Google Analytics tracking values
If you opt to view your Google Analytics reporting within our reporting (see how to do this below), then customising Google Analytics tracking values can mean the associated data will not get pulled through. To get it to pull through, make sure:
- utm_source is a static value (but it can be anything you like)
- utm_campaign must remain $CAMPAIGN_NAME$
How do I view Google Analytics reporting within the app?
When checking your email reports in the app, you'll also want to see your Google Analytics data in there too, rather than having to also have Google Analytics open alongside your reporting. For your convenience, we've ensured that you can do this.
Please note: viewing Google Analytics reporting in-app isn't available for triggered campaigns, only for standard campaigns.
To allow us to pull your Google Analytics data into reporting, you'll need to authorise the connection to Google Analytics.
To do this, open the settings menu from the bottom left corner of the screen, then go to Account > Account settings, scroll down to the 'Google Analytics' section at the foot of the page and click the Authorise connection link.
If you're logged into your Google account already, a box will pop up asking you to allow the connection request; if not, you'll need to enter your username and password before being asked to allow the connection request.
Now, when you go to Analytics > Channel analytics > Reports: Email and select your campaign, selecting More reports will provide a Google Analytics option at the very bottom of the menu.
When you first open it, we'll ask you which Google Analytics profile the campaign was for, and we'll remember this for next time. But you can always change it, and this is handy for campaigns that may affect more than one of your profiles.
It's worth waiting at least 48 hours before checking your statistics because, as well as waiting for users to receive your email, you may need to wait for Google Analytics to process any visiting activity.
Note: this feature isn't available on all accounts. If you'd like to upgrade to enable this feature, contact your dedicated account manager (if you know who it is), or fill out this request form, making sure that you specify 'Account Management' as the query type.
Why does Google Analytics sometimes not correlate with Dotdigital's reporting?
Google Analytics reporting does not always correlate with Dotdigital reporting for various reasons; sometimes Dotdigital shows higher number of results than Google Analytics, and other times it could be that Google Analytics has stored higher number of results than Dotdigital. See below for a brief explanation of why that can occur.
Why has Google Analytics stored a higher number of results than the results stored in Dotdigital reporting?
Google Analytics defines a session (by default 30 minutes, however subject to alteration by the recipient) as a group of browsing activity meaning if you donโt have any activity for 30 minutes, then start browsing again, it will count as a new session. You can find more information about sessions by visiting this Google Analytics help article.
Why has Google Analytics stored a lower number of results than the results stored in Dotdigital reporting?
There are a few factors that can lead to the Google Analytics results being lower than the results in Dotdigital reporting. One of the most likely scenarios for this discrepancy:
A contact clicks on a link > Dotdigital decodes the link and counts it as a click-through on the reporting page > the page doesn't load completely, therefore the Google Analytics tracking query does not fire.
This could have been caused by any of the below scenarios:
- The contact closes the browser before the page finishes loading, and therefore the Google Analytics queries are not fired.
- The web page takes so long to load that the Google Analytics tracking never fires.
- The contact has already visited the same page recently, so the Google Analytics tracking doesn't fire.
- Something on the page is throwing an error before the Google Analytics tracking on the page is reached.
- The link wasn't being followed by a real user, but by an email scanning software that looks at the HTML, therefore doesn't trigger the Google Analytics JavaScript.
Can I link Google Analytics to more than one website/domain?
It is only possible to synchronise your Dotdigital account with one Google Analytics account; however, your Google Analytics account can be linked to other separate websites/domains. Google Analytics simply pushes the data back into Dotdigital, in which case you select the website from the drop-down list, meaning that the Google Analytics feature in Dotdigital will allow you to see data for 'website X' in 'Dotdigital account Y' and vice versa.
Will the Google Analytics tracking work when it's been set up after the campaign was sent out?
Google Analytics cannot work retroactively, that is the Google Analytics account must be set up and configured before the tracked campaign is sent out. If a triggered campaign has been set up before the Google Analytics configuration, then the triggered campaign needs to be saved for any future sends to be tracked via Google Analytics.
How long does it take for Google Analytics to update the data?
Processing latency is 24-48 hours. Standard accounts that send more than 200,000 sessions per day to Analytics will result in the reports being refreshed only once a day. This can delay updates to reports and metrics for up to two days.
Can Google Analytics track External Dynamic Content (EDC) links?
Yes, Google Analytics can track EDC links, and Dotdigital automatically applies UTM variables to links generated via EDC.
What causes discrepancies between the Dotdigital ROI figure and the Google Analytics ROI figure?
Dotdigital's campaign tracking for ROI expires after one hour, and in contrast, Google Analytics' tracking expires after six months. This can be changed using the _setCampaignCookieTimeout(); further call details can be found in this Google Analytics article.
Google watches visitors for far longer than Dotdigital does, and the Google revenue number will typically be higher than the Dotdigital one over time.
Therefore, if a recipient clicks a link in a campaign that takes them to your website, but then decides to make a purchase after 60 plus minutes before the Google tracking expires, they will be tracked by Google as revenue, but not by Dotdigital.