Set up email tracking with Google Analytics!
- Then create a custom metric by going to your admin settings, chosing your property then Custom Metrics.
-
Add the following settings
4. Go to https://ga-dev-tools.appspot.com/hit-builder/ and add the following parameters, change the value of “tid” to your Google Analytics Tracking ID. Then copy the generated parameter string. -
Useful examples can be found here: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#commonhits
make sure you validate it and test before copying the tracking parameters.
-
Copy the string from the hit builder and add it to the following image link
<img src=”http://www.google-analytics.com/collect?″ />
so it becomes
<img src=”http://www.google-analytics.com/collect?v=1&t=event&tid=UA-12345678-1&cid=unqiueid&cm=email&cm1=promotemplate1&cs=newsletter&el=unqiueid&ec=email&cn=campaignname&ea=open″ />
-
Place that image tag just before the closing tag of your body in the email
<img src="http://www.google-analytics.com/collect?v=1&t=event&tid=UA-12345678-1&cid=unqiueid&cm=email&cm1=promotemplate1&cs=newsletter&el=unqiueid&ec=email&cn=campaignname&ea=open" /> </body>
-
Replace uniqueid something that gets generated automatically through your email provider.
For mailchimp its *|UNIQID|* so your tracking should now look something like this if you use MailChimp:<img src="http://www.google-analytics.com/collect?v=1&t=event&tid=UA-12345678-1&cid=*|UNIQID|*&cm=email&cm1=promotemplate1&cs=newsletter&el=*|UNIQID|*&ec=email&cn=campaignname&ea=open" />