universal crt_检测Google Universal Analytics

universal crt

Just about everyone uses Google Analytics and why shouldn't they?  The amount of useful data you can pull from Google Analytics, especially if you use custom dimensions, is amazing.  Whether you're A/B testing, trying to increase engagement, or improve sales, Google Analytics is just about perfect.

几乎每个人都使用Google Analytics(分析),为什么不呢? 您可以从Google Analytics(分析)中提取有用的数据,尤其是在使用自定义维度的情况下。 无论您是要进行A / B测试,还是要提高参与度,还是提高销售量,Google Analytics(分析)都将近乎完美。

I recently experimented with detecting external link clicks with the current version of Google Analytics called Universal Analytics.  In doing so I realized that utilities like Ghostery blocked GA, which is fine, but they also shim the ga function that I was using to detect if the third party service was loaded.  Damn.  It turns out you need to do an additional check:

最近,我尝试使用最新版本的Google Analytics(分析)检测外部链接点击,该方法名为Universal Analytics。 通过这样做,我意识到像Ghostery这样的实用程序会阻止GA,这很好,但是它们也使我用来检测是否加载了第三方服务的ga函数成为碎片。 该死的。 事实证明,您需要进行其他检查:


if(window.ga && ga.create) {
	// Do you ga stuff
	ga('send', 'pageview');
}


Checking for the Analytics's custom create method ensures that Google's utility is there and not simply shimmed by Ghostery or a likewise service!

检查Google Analytics(分析)的自定义create方法可确保存在Google的实用程序,而不会被Ghostery或类似服务简单填充!

翻译自: https://davidwalsh.name/detecting-google-analytics

universal crt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值