2016-06-18 206 views
1

我正在使用以下代码来跟踪打开的电子邮件。电子邮件跟踪谷歌分析

var tracking_url = encodeURI('http://www.google-analytics.com/collect?v=1&tid=UA-66604xxx-1&cid='+client_id+'&t=event&ec=email&ea=open&el='+emailAddress+'&cs=newsletter&cm=email&cn=Referral&cm1=1');

导致 http://www.google-analytics.com/collect?v=1&tid=UA-66604xxx-1&cid=63681169&t=event&ec=email&ea=open&[email protected]&cs=newsletter&cm=email&cn=Referral&cm1=1

而由JavaScript将此值传递这样'<img src="'+tracking_url+'" />'

和Gmail输出是这

<img src="https://ci3.googleusercontent.com/proxy/yKWjuqq9fnjMaHMSqTLQwRvro_GdxobvmNO67ldPoBLI8_Ssnk3WIOWDbu9EX7Qb4RNvTA95hOKhTZMk3K2toUdUMduZIUijCFcKL1vRXEFHffwXIZX41I1ZfbZBJ445sDAS8gygd8hs2428fyTHwmBboCwDY2-WpYQ9yFwq1h-0EMoHLcxkXJ9mX-BOW3TMcSpmTIFa-cl-Thj7JLBqU2Dg-2RsnA9hf9ecZf8YTKtJ_D1PumKa1rw=s0-d-e1-ft#http://www.google-analytics.com/collect?v=1&amp;tid=UA-66604xxx-1&amp;cid=1696011369&amp;t=event&amp;ec=email&amp;ea=open&amp;[email protected]&amp;cs=newsletter&amp;cm=email&amp;cn=Referral&amp;cm1=1" class="CToWUd">

但在我的分析p anel没有任何东西正在反射

+0

'el = secretemail @ secretemail.in' - 我希望您不会收集电子邮件地址,因为这违反了Google的隐私政策和使用条款。 – nyuen

回答

0

Google serves images in Gmail through a proxy server。当电子邮件被打开时,它会调用代理版本(实际上它像缓存一样),而不是将命中发送到GA服务器的URL。我认为其他网络邮件客户端现在的行为相似,因此通过web bugs跟踪打开的电子邮件现在不太可靠。