Analytics
4.1K members online now
4.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

GA code to track email views

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi

I have been trying to embed <img src="http://www.google-analytics.com/collect?v=1&tid=UA-xxxxx-x&cid=[UNIQUE]&t=event&ec=email&ea=open&el=... width="1" height="1" border="0" />

Custom metrics are defined here

http://prntscr.com/94aalb

 

Event report in GA does not reflect not accurate data. Some data is captured but as compared to email tracking in Litmus, it shows a fraction eg Litmus may show 9000 opens whereas GA shows less than 1000.

Is there anything wrong with code?

 

Thanks in advance.

 

1 Expert replyverified_user

Re: GA code to track email views

Rising Star
# 2
Rising Star
Hey Sandeep, how are things?

Tracking E-mail Marketing with Analytics is not the best thing in my opinion, but it's possible. You can use Measurement Protocol to help you with.

This page have everything you need in order to do that:
https://developers.google.com/analytics/devguides/collection/protocol/v1/email

Hope this helps.

Leandro Martinez | Basta1Click

Re: GA code to track email views

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi leandrofm, Thanks for reply.
I have looked into it and created the img url accordingly. But the issue is data does not seem being collected fully.
So troubleshooting -can I pass 'clientId' in cid?

Thanks.

Re: GA code to track email views

A T
Participant ✭ ✭ ✭
# 4
A T
Participant ✭ ✭ ✭

Make sure there are no filters added in the GA view that might affect the count.

 

Also you can use hit builder to validate: https://ga-dev-tools.appspot.com/hit-builder/