Wondering how much are we going to cost you? Well thats a valid concern. Agency Fee Calculator (Takes less than 10 seconds)

Email Tracking In Google Analytics10 min read

October 23, 2018

Google Analytics (GA) is conventionally used to track customer use and engagement on a website, but it comes to as a great aid to monitor the opens of an email. The usual methods of utilising Google Analytics’ javascript code do not work in email clients, and hence email opens cannot be tracked just by just embedding the GA tracking code. The GA involves event tracking features which can be used through an integrated transparent image pixel in the email body itself for its tracking. You may find using GA beneficial over most email service provider (ESP) tracking. It provides excellent system information like real-time tracking, browser and operating system details, demographic information including location, and finally is capable of tied in nicely with your web reports. There is no requirement of prior technical knowledge to apply these approaches. What you need to do is to follow the instructions and keep a simple structure of URL and UTM (Urchin Tracking Module) parameters.

What will you need?

You’ll need a Google Analytics Tracking ID available for integration. The following options can be chosen to select a Tracking ID:

At first, you need to create a Google Analytics account. Google Analytics tracking mechanism uses JavaScript snippet, which remains inserted in the headers or footers of the HTML code.

The main problem with the emails is that they do not load JavaScript, and hence what is called for to resolve this issue is to create a 1px-by-1px transparent image in your email, which Google Analytics will identify as an image. Whenever the receiver opens the email, the pixel will send request to Google Analytics, and thereby, the system will collect necessary statistical data.

Step 1: To Create a New Property in Google Analytics: 

Log into your Google Analytics profile and select the website in which you’d like to add a new property.

Now click on Admin in the left taskbar.

In the Property column, you need to click on the drop-down menu, and then, click Create new property.

Then click Get Tracking ID. 



Step 2: To Create the Tracking URL 

The Email opens in Google Analytics is tracked by integrating an image pixel within the body of the email itself. Whenever you open an email, the email client, in turn, brings out this image.

This image so fetched then passes the email tracking information on to the Google Analytics, which is viewable in your Google Analytics dashboard. However, before creating an image, we need to create a particular tracking URL, which must be structured.

The structure of the URL stands https://www.googleanalytics.com/collect?v=1.

It reflects the domain name (google-analytics.com) and its linkage to the GA server and the phrase “collect?v=1” tells the servers about the data- collection with the URL. The v=1 is nothing but the Google Analytics protocol version. We need to attach a bunch of parameters to it to allow this URL to track the email opens.

These parameters, in turn, will help store the information about the tracked event.

These parameters may be meaningless for you, but they are relevant for Google Analytics to correctly interpret or track the email open. These parameters actually remain attached to the main URL and interlinked with “&” sign.


Finding the Tracking ID in Google Analytics 

The first parameter added to the URL is the “tid”, which passes on your GA tracking ID fetchable from your Google Analytics account to Google Analytics. It must be assigned the value.

What do you need to do to find the Tracking ID?

  •    Log in to your GA account
  •    Click on the ‘Admin’ button () on the bottom left corner of your GA account
  •    Click on the ‘Tracking info’ under the ‘Property’ section to reveal your Tracking ID.

The other parameters we require to append to the URL are,

  •   cid — CLIENT_ID _NUMBER (a tracking ID for the user)
  •   t — event (this parameter tells GA that it is a Hit Type Event)
  •   ec — email (ec is Event Category, which tells GA that the event category is “email”)
  •  ea — open (ea is Event Action, which conveys the event action to GA, which is “open” in this case)
  •   tid — Google Analytics Tracking ID, which displays your account).
  •  cid — Client ID. You can use code “555” to show that it’s anonymous.
  •  aip — Anonymize IP parameter. You can add “1” to enable it.
  •   t— Page view hit type. You can name it “event”.
  • ec — Event Category. You can use the word “email” to name it.
  •  ea — Event Action. You want to track email opening, so your action is to “open”.
  • el — Recipient_ID (el is Event Label that assigns a unique id to the recipient of the email and passes on to GA)
  • cs — Newsletter (cs is Campaign Source. GA uses it to segregate campaign types, here I’m using the type “newsletter”)
  • cm — email (cm is Campaign Medium. GA uses it to segregate campaigns based on mediums (e.g. email, social media and so on)
  • cn — MY_EMAIL_CAMPAIGN (cn is Campaign Name that passes on the campaign name to GA. You can assign any custom campaign name to this parameter)
  • dp — Document path. You can name it “Email Newsletter”. Don’t forget to substitute slashes with ‘%2’ is the equivalent of ‘/’ in the URL.
  • dt — Document title. You can use any title, for example, “My Newsletter”. Here you need to substitute spaces with %20.


Step 3: To Create the trackable pixel URL 

When the tracking URL is ready, we can create the fake image pixel by embedding the tracking URL within a simple HTML Image tag:

<img src=https://www.google-analytics.com/collect?v=1&tid=UA-12345678-1&cid=555&t=event&ec=email&ea=open&el=recipient_id&cs=newsletter&cm=email&cn=MY_EMAIL_CAMPAIGN&dp=%2Femail%2Fnewsletter1&dt=My%20Newsletter>

Pixel tracking is the system of embedding a 1px-by-1px transparent image—ordinarily a. GIF or. PNG file—into the header, body, or footer of an email.

The first parameter to be added to the URL is the “tid”.  This parameter is passed on to your GA tracking ID. It must be assigned the value as tid= UA-12345678-1 (You must replace this with your property ID.)

Step 4: Embedding the Image in the Email (Creating a test email) 

  1.    Paste the Tracking URL encapsulated in the image tag into a text editor (here Notepad) as shown in the pic below:
  2. Give a relevant name to the file and save it with an HTML extension.  Please note that I have added a text “Email open tracking test email” above the HTML Image tag to ensure that the file has loaded successfully in a browser.
  3. Open the saved HTML file in a browser to see that it’s loading. You will see the added text if the file is loaded successfully.
  4. Now you copy the text from the browser and then paste into the email client software editor (e.g. Apple Mail, Outlook, etc.).  You then have to Send the email to your email id or any other test email id, remembering this is just a test mail.
  5. Lastly, you have to open the received email to trigger the event (email open). After that, go over to your Google Analytics account to check whether the incident stands captured or not.


Test your email and make sure the tracking pixel is working 

Example of an email open event being triggered


Step 5: To check if the email opens stand captured by Google Analytics

It is the last step, which is meant to test your email and see how this tracking approach works in practice.

It is to see if the tracking-URL embedded image tag successfully passes on the email-open tracking information to GA when logged into your GA account, and to check the Events section under Reports in ‘Real-Time’.

If you see under the “Event Category” an entry like the one seen in the pic below, it is sufficient proof of successful capturing by the GA account of email open tracking event.

You must keep in mind that it’s unlikely that you’ll see any results if you have opened a test email through Gmail. It is merely because

this mailing service protects users from getting tracked. Simultaneously, it saves from a fake image on a server without being shown to him. It is because the ‘Gmail Image Proxy service’ does not forward users’ cookies. Hence you are deprived of using the measurement protocol necessary for tracking the Gmail users by allowing such requests to pass through an intermediate server.

However, it seems to work correctly for other widely-used services like Outlook and Apple Mail.


Tracking post-click performance with UTM parameters

You must keep in mind that open rate is not the only thing, which matters. If you wish to analyse the results of your email campaign in details, you can track ‘post-click performance’.

When you are using Google Analytics, you must know what your subscribers do while travelling to your site. The insights will make you aware about the pages, which receivers prefer to visit and the products, which they usually buy.

You also get information on how much time they spend on a page and how long they stay on your website.

There are four UTM parameters, which you must customise to maximise the effectiveness of the tracking process.

Must keep in mind that every element of the code is responsible for a specific aspect of the website’s traffic:

  •  utm_source — Campaign Source, which can be Google, Twitter, Facebook, or any other source of traffic. For email campaign, you should choose “Newsletter”.
  •   utm_medium — Campaign Medium. Here you should type the word “email”.
  •  utm_campaign— Campaign Name. You can use any relevant and unique name. Let’s take the words “Product Launch” as an example.
  • utm_content— Campaign Content. You can link this code to any text, CTA or linked image. An example is “image1”.

As a result, you can join all these UTM parameters into one link, and it will look like this:



Modern technologies help you with UTM codes creation. Therefore there is no need to write them manually. You may use free Google URL builder to generate a link automatically. It will help you avoid the errors and save your time.

You may add ready-to-use code to your campaign in two ways- manually or technologically with the help of your email service provider if it offers such a service.


Tracking Limitations

As per Google, this event tracking technique does not work on traditional browser-based email programs like Gmail and Yahoo etc. But we tested it and it worked fine for us. Only one issue we identified was non segregation of unique events as same cid is being passed.

There are several things, which are beyond the perimeter of image pixel tracking. It is for the reason that when you forward an email to the next recipient, the tracking pixel is stripped off from the email. As the pixels is a transparent image, recipients that automatically block images from loading or otherwise displaying all the contents as texts in received emails, will prevent the tracking pixel barring it from any providing any information. More web-savvy recipients might have specific browser extensions that disable tracking pixels from activating altogether, whether or not the pixel loads in the email.

It is pertinent to understand that pixel tracking only reports information of opened email, and is not a metric of click-throughs, form fills, or other interactive engagement.

The tracking pixel can report if an email is opened, but does not give clues as to whether or not the recipient clicked the link.

This feature adds to the risk of repeated engagement, as subsequent emails may be unsubscribed from or labelled as spam. Thus, tracking pixels present a means of obtaining information that is otherwise unknown.

Email opens’ tracking in Google Analytics is not difficult if you know how the system is set up.

Social Shares