Track email open event with google analytics

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

URL ParamDescriptionSample Value
vGoogle Analytics (GA) Version Number1
tidGoogle Analytics Tracking IDUA-48261097-1
cidCLIENT ID (Random alpha numeric characters)2b884d0f825b
tEvent Hit Type event
ecEvent Categoryemail
eaEvent Actionopen
elEvent Label (Unique identification for this recipient)John Doe
csCampaign SourceproductPromotion
cmCampaign Mediumemail
cnCampaign Name IdentifierbusinessEmail
Make sure all values of the url parameters should be url encoded.

You can add this url in image tag like this in the bottom of your email content.

<img src=""/>

You can track events in Google Analytics and you will see something like this

Google Analytics Preview
Google Anlytics Dashboard Preview
Track email open event with google analytics Track email open event with google analytics Reviewed by Altaf Hussain on December 11, 2015 Rating: 5

No comments:

Altaf Web. Powered by Blogger.