Google Analytics has a great feature which allows us to Track Email Open stats. It provide us a single url which is to be embed as an image with img tag. The url of the image contains all necessary parameters to track the event. The full image url sample would be something like this
http://www.google-analytics.com/collect?v=1&tid=UA-48261097-1&cid=2b884d0f825b&t=event&ec=email&ea=open&el=John+Doe&cs=productPromotion&cm=email&cn=businessEmail
URL Param | Description | Sample Value |
---|---|---|
v | Google Analytics (GA) Version Number | 1 |
tid | Google Analytics Tracking ID | UA-48261097-1 |
cid | CLIENT ID (Random alpha numeric characters) | 2b884d0f825b |
t | Event Hit Type | event |
ec | Event Category | |
ea | Event Action | open |
el | Event Label (Unique identification for this recipient) | John Doe |
cs | Campaign Source | productPromotion |
cm | Campaign Medium | |
cn | Campaign Name Identifier | businessEmail |
You can add this url in image tag like this in the bottom of your email content.
<img src="http://www.google-analytics.com/collect?v=1&tid=UA-48261097-1&cid=2b884d0f825b&t=event&ec=email&ea=open&el=John+Doe&cs=productPromotion&cm=email&cn=businessEmail"/>
You can track events in Google Analytics and you will see something like this
Google Anlytics Dashboard Preview |