If you ask Google about the tools for email tracking, you’ll have to shovel through a pile of free and paid options. Most likely, Google Analytics won’t be in the top 10 search results. This is because GA is oriented on link or click tracking – it gives insights into how users find and use your web app. However, you can set it up for your email campaigns to track whether the emails were opened. Wonder how? Find out in this post.
Why use Google Analytics for email tracking?
Email tracking is a solution to make your email campaigns efficient and productive. It can give answers to many questions like how many emails were opened, how many recipients opted out and more. All these questions define valuable metrics (open rate, click rate, etc.) that converge on the main goal of any email campaign – conversion.
Google Analytics is a powerful tool for click tracking but it’s not the best out there for tracking emails. You can insert a URL to your emails and get many after-click insights and see how the link performed. And what if the recipient opened your email but did not click the link? You won’t even know this because GA does not provide a feature to track emails. So, what is this all about then?
Below, you’ll find a trick consisting of a few manipulations to let GA track email campaigns. This may be helpful if you’re already using Google Analytics for email marketing and have no desire to add a separate app or software for email tracking.
How it works
This technique is known as Google Analytics pixel tracking. You’ll create a trackable URL and disguise it in your email as an image pixel. Once the recipient opens the email, the email client fetches this image, which then transmits insights to the GA servers. In your Google Analytics account, you get information about when, where, and on what device the email was opened.
What GA can’t do
Google Analytics is not a dedicated tool for email tracking, so you won’t be able to:
- learn the persona that opened your email (no IP address, username or other personal information except for some demographic data)
- understand why the recipient opened your email or not
- track how many times the same email was opened by the same recipient
- get immediate notifications when the recipients open your email
- track email opens in browser-based email clients like Gmail, Yahoo, and others
If you’re, however, still interested in how to track email opens with Google Analytics, let’s discover this tricky technique.
Step by step guide for tracking emails in GA
Those who already have a GA account can skip this block. GA beginners can take a look at how to sign up for Google Analytics first. For this, you need to:
- create an account name
- choose what you want to measure (web app, mobile app, or both)
- specify property details (for web app, these are the name, URL, industry category, and reporting time zone)
- and accept Google Analytics Terms of Service Agreement
In the end, you’ll find yourself on the Admin tab.
How to create a trackable URL?
We need to create a trackable URL and wrap it in the JavaScript code snippet. Here are the parameters the URL will consist of:
https://www.google-analytics.com/
– link to the GA server.collect?v=1
– tells the GA server that the data is collected with the URL via the first version of GA measurement protocol.tid=
– passes on your GA tracking ID. For example,tid=UA-87654321-9
. You can learn your Tracking ID from Tracking Info>Tracking Code.
cid=
– a tracking ID that you assign to recipients. For example,cid=12345678
t=
– specifies a hitType of event. For example,t=event
ec=
– specifies an event category. For example,ec=email
ea=
– specifies an event action. For example,ea=open
el=
– specifies an event label that assigns a unique id to the recipient. For example,el=recipient_id
cs=
– specifies a campaign source. It’s used for segregation of campaign types in GA. For example,cs=newsletter
cm=
– specifies a campaign medium for segregation of campaigns. For example,cm=email
cn=
– specifies a campaign name which you assign to this parameter. For example,cn=FirstEmailCampaign
dp=
– specifies the path of the tracked item. For example,dp=%2Campaign%2Newsletter
defines the /campaign/newsletter path.dt=
specifies the title of the tracked item. For example,dt=Daily%20Newsletter
denotes Weekly Newsletter
Let’s see the full URL that we’ve got:
https://www.google-analytics.com/collect?v=1&tid=UA-87654321-9&cid=12345678&t=event&ec=email&ea=open&el=recipient_id&cs=newsletter&cm=email&cn=FirstEmailCampaign&dp=%2Campaign%2Newsletter&dt=Daily%20Newsletter
How to add a trackable URL in the email?
GA tracks web pages using a special JavaScript code included in header of the HTML code of the page. When the page loads, it captures demographic data and other information about the user. We can’t use this code for tracking email campaigns because emails can’t load JS. But we can enclose the trackable URL within a simple HTML image tag as follows:
<img src=”https://www.google-analytics.com/collect?v=1&tid=UA-87654321-9&cid=12345678&t=event&ec=email&ea=open&el=recipient_id&cs=newsletter&cm=email&cn=FirstEmailCampaign&dp=%2Campaign%2Newsletter&dt=Daily%20Newsletter”>
Now, you need to insert this tag into your HTML email and send it. Keep in mind that some email clients like Gmail does not offer a way to compose an email in HTML. If you simply copy and paste the image pixel in your email, Gmail will consider it as a TEXT, and Google Analytics won’t get any insight. Luckily, we have a lifehack on how to send an HTML email from Gmail:
1. Create an HTML template and add the image tag in it. Save the content as .html file. For example, TestEmail.html:
<html>
<body>
// Here is a test email.
<img src=”https://www.google-analytics.com/collect?v=1&tid=UA-87654321-9&cid=12345678&t=event&ec=email&ea=open&el=recipient_id&cs=newsletter&cm=email&cn=FirstEmailCampaign&dp=%2Campaign%2Newsletter&dt=Daily%20Newsletter”>
</body>
</html>
2. Open your .html file in the browser, select all the content, copy it and paste into your email.
3. Send the email.
Send a test email first
Before sending your trackable email campaign to the recipients, test it with Mailtrap. With this service, you can check the email sending of your web app and preview your email as well. You don’t have to create fake email addresses and send emails to them. All you need is to replace your app’s SMTP settings with those generated by Mailtrap. It has a fake SMTP server under the hood and traps all the emails sent from your app or email client. Also, Mailtrap checks HTML and spamminess of your emails.
So, sign up to try it yourself and learn more on its functionalities from the Mailtrap Getting Started Guide.
Checking reports for email campaigns in GA
The first part was about creating and sending trackable emails. Now, it’s time to take the crop and check out the results in Google Analytics. Find the Reports section on the left of GA page and select Overview. This is how it looks before the recipients start open your emails.
And that’s what you will see when the emails are getting opened.
We also promised that you’d see where, when and on what device the email was opened. This is true. Browse the Realtime section and check out such tabs as Locations, Traffic Sources, Content, and Events. They will provide you with all the insights you can have when tracking email opens with GA.
Alternatives to Google Analytics or why GA is a bad choice for email tracking?
Certainly, if you want to track your email campaigns with GA and its embedded analytics capabilities, it’s your decision. But do you really want to perform all the manipulations mentioned above to get so few insights? Google Analytics is cool for tracking clicks, but for emails, you can benefit from much higher-performing solutions. Here are some of them:
Hubspot Sales Hub
HubSpot Sales Hub provides time-saving sales software package for:
- Automating personalized outreach
- Creating and sharing email templates
- Automating lead rotation
- And many more.
In terms of email tracking, Hubspot displays immediate desktop notifications when emails are opened. This will let you pick the best time for a follow-up and react as fast as necessary. Also, you’ll benefit from a built-in activity stream, which automatically logs the history of each recipient.
Benchmark Emails
It was a challenge for us to choose between Benchmark Email and MailChimp. Both services are very similar in terms of open tracking. Since MailChimp has already featured in many of our blog posts, we opted for Benchmark Emails. It is a powerful email marketing solution for building and sending email campaigns. One of its cool features is Reporting. It lets you track email opens in real time. This includes geotracking, link clicks and different type of recipient’s activities like forwarding or sharing your email campaign in social media.
ContactMonkey
ContactMonkey is an actionable email tracker that you can integrate into your inbox. It is free of any gaps that you would experience when tracking email with Google Analytics. ContactMonkey provides real-time reporting on email opens and tells the recipient’s location and software used for opening your email campaign.
To wrap up
Google Analytics is a noteworthy solution for many tasks. We, however, do not think it’s a good choice for tracking emails if compared to numerous alternatives with more efficient functionalities. Anyway, make your own choices and pick the best options for your email toolbox. What we are 100% confident in is that Mailtrap is a must-have for any email-related activity. Make sure to have it for yours. Good luck!