防止我的数据影响谷歌分析 [英] prevent my data from affecting google analytics

查看:116
本文介绍了防止我的数据影响谷歌分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近推出了一个网站,我正在使用谷歌分析来追踪流量和趋势。不幸的是,我喜欢与我的业务合作伙伴一起检查自己的网站,我们的数据正在影响我们的谷歌分析!有没有一种简单的方法可以让某些用户活动不会被谷歌分析跟踪?



我想附加另一个域名(或子域名)到我的网站,我可以通过访问我的网站。如果我这样做,那么仍然会记录?



是否还有其他一些欺骗我可以使用,这样我的数据将被我自己的用法破坏?



谢谢!

解决方案

每个要跟踪的页面都需要一个谷歌的小脚本,以便谷歌接收跟踪数据。



如果您不运行该脚本,Google不会获取任何数据。

如果您的网页是由PHP,django或类似的动态生成的,那么您可以决定何时动态地将google脚本打印到这些动态页面中,而不是在请求来自公司列入白名单的IP地址。



但是,如果您的网页是静态网页,那就更麻烦了。



对于静态网站,您可以创建一个特殊页面,其中包含由内部人员链接到任何最常用页面的链接,然后检查document.referer以决定是否运行该脚本。

但这对内部用户开始点击的丰富静态网站不起作用。对于那些,我建议使用setTimeout()延迟运行google脚本,如果传入用户确认他们是内部用户,则调用clearTimeout()。这可能会检查形式为秘密握手的形式,在前5秒内点击公司徽标并且没有跟踪来调用clearTimeout()。

或者,在analytics.google.com数据门户网站中,您可以过滤访问者的网络域数据。如果您将自己的公司名称显示为网络域,而不是verizon或isp名称,那么您可以设置为编写排除过滤器。否则,您可以使用城市或州,但会过滤掉更多。


I recently launched a website and I'm using google analytics to track traffic and trends. Unfortunately I like to check on the site a lot myself along with my business partner, and our data is affecting our google analytics! Is there a simple way to make it such that certain user activity won't get tracked by google analytics?

I'm thinking of maybe attaching another domain name (or subdomain) to my site that I can access my website through. If I do that, will that still get logged?

Is there some other sort of trickery I can use so that my data will be uncorrupted by my own usage?

Thanks!

解决方案

Every page that is to be tracked needs to have a small script from google in it, in order for google to receive tracking data.

If you don't run that script, google gets no data.

If your web pages are produced dynamically by PHP, django, or similar, then you could decide when to print google's script into these dynamic pages dynamically, and not do it when requests are made from IP addresses whitelisted by the company.

But if your pages are static, that is more of a problem.

For static sites, you can create a special page that contains a link to any "most used" pages by insiders, and then check document.referer to decide whether to run that script.

But that won't work for rich static sites where the internal user starts clicking around. For those, I would recommend running google's script with a setTimeout() delay, and calling clearTimeout() if the incoming user confirms they are an internal user. This might check a "secret handshake" of the form "click the company logo in the first 5 sec and you dont get tracked" to call the clearTimeout().

Alternatively, within the analytics.google.com data portal you can filter data on "network domain" of visitors. If you have your own corporate name showing as the network domain, instead of "verizon" or the isp name, then you are set for writing an exclusion filter. Otherwise you could use city or state, though that would filter out more.

这篇关于防止我的数据影响谷歌分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆