Email Tracking - Measurement Protocol

This document describes how to measure user interactions with email using the Measurement Protocol.

Overview

Email allows you to maintain a relationship with your customers beyond your app and website. This guide will first start with some basics of the Measurement Protocol as it applies to emails. Then it will go over tracking email opens and clicks on links inside emails.

Measurement Protocol for emails

All Measurement Protocol hits require certain fields. This document will go over how to choose them and some recommended fields.

You will need to place an image tag within the email. We recommend placing the image at the bottom of the email, so it does not delay loading the email's main content.

<img src="https://www.google-analytics.com/collect?v=1&..."/>

Tracking ID (&tid)

Use the same Tracking ID as your site. This will allow Client IDs and User IDs to work across devices and media types.

Client ID (&cid)

The Client ID should be a random 64 bit integer. Historically, Google Analytics has separated its clientID into two 32-bit, unsigned, base-10 parts: 123456789.123456789. The measurement protocol supports larger UUIDs including alpha numeric characters.

User ID (&uid)

If you use userID to measure users cross device, you may use that for emails in addition to the Client ID.

Events

Email opens should be tracked as events. Use a category (&ec) of email and an action (&ea) of open.

t=event&ec=email&ea=open

Events can be reported in a unique manner, which is important for email opens, as you can open an email multiple times.

Document Path

All events can have a document path (&dp) or document location (&dl). Use document path, since emails don't conform to standard URLs. It will have to start with a forward slash (/) and be unique per email.

Document Title

The document title (&dt) should be the subject line of the email.

System Info Fields

If System info fields are known (such as language), add them to the hit.

Campaign Fields

Without campaign fields, the email open will be tracked as (direct) or the last campaign. Depending on the email this may be the desired behavior. If not, set the campaign parameters as listed in traffic sources.

Campaigns require a name (&cn) or id (&ci) field. Use email as the medium (&cm).

Tracking Link Clicks

The email should have links back to your website or app. We recommend tagging the links with campaign parameters. Use the URL Builder to create links.

Referers in Emails

Some email clients will use link redirectors that will mask the source of the email. Also, the referer will appear to come from the email provider and not the email. For these reasons they are unreliable for tracking.