菜单

GA匿名IP

2012年05月28日 - Google

_anonymizeIp()
Tells Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage. Note that this will slightly reduce the accuracy of geographic reporting.

When using this function to anonymize tracking, you must use the push function and properly associate the function with the tracker object, as illustrated below.

Async Snippet (recommended)

var _gaq = _gaq || [];
_gaq.push (['_setAccount', 'UA-XXXXXXX-YY']);
_gaq.push (['_gat._anonymizeIp']);
_gaq.push (['_trackPageview']);


Traditional (ga.js) Snippet



发表评论

电子邮件地址不会被公开。 必填项已用*标注