Friday, December 5, 2014

How To Track Email Opens With Google Analytics

Detailed instructions of how to use Event Tracking within Google Analytics can be found here, but here is an overview:

At the top level, Event Tracking is done through embedding an image tag within the HTML of your email. This will look like:

Code Sample

The URL of the image contains all the information necessary for Google Analytics to understand what account you’re using, what email campaign you’re sending, and which user is opening your email. Here’s what a completed URL might look like:

Now let’s look how you can break down this URL:
URL ComponentExplanation
v=1                                              -     Protocol version within Google Analytics
tid=UA-12345678-1                   -     Your Google Analytics Tracking ID
cid=CLIENT_ID_NUMBER     -      A systematic tracking ID for the customer
t=event                                        -     Tells Google Analytics this is an Event Hit Type
ec=email                                     -     The Event Category helps segment various events
ea=open                                      -      The Event Action helps specify exactly what happened
el=recipient_id                           -      Event Label specifies a unique identification for this recipient
cs=newsletter                             -      Campaign Source allows segmentation of campaign types
cm=email                                   -      Campaign Medium could segment social vs. email, etc.
cn=Campaign_Name                 -       Campaign Name identifies the campaign to you