How to exclude self-traffic in google code from google analytics reports?

▼魔方 西西 提交于 2019-12-06 07:55:08

问题


I'm currently using Google Analytics to get reports for my project hosted on code.google.com.

I'd like to exclude the traffic generated by myself. I know that Google Analytics basically offers two way to filter my traffic: by IP address and by cookies. The ISP gives me a dynamic IP address so I can't filter by IP address. I should then use the cookies method.

I read I should add some javascript code to my site to set the cookie. My question is: how can I add into the wiki pages of google code the javascript I need? Is there another way to achieve my goal?

Thanks.


回答1:


http://ode2code.blogspot.se/2009/02/how-to-exclude-self-traffic-from-google.html contains a solution that seems valid:

Setting the cookie:

Create a new page on your domain, containing the following code:

body onLoad="javascript:__utmSetVar('no_report')"

Visit this page from all computers that you would like to exclude from your reports, to set the cookie on each machine.

Creating the filter:

You'll need to create an Exclude filter to remove data from visitors with this cookie.

  • Filter Type: Custom filter > Exclude
  • Filter Field: User Defined
  • Filter Pattern: no_report
  • Case Sensitive: No

How to create a filter?

http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55494

Use this together with this wiki article http://code.google.com/p/support/wiki/WorkingWithGoogleGadgets to create a gadget containing the script that you may include on your page.




回答2:


Several chrome and firefox extensions are available that allow you to block google analytics tracking on a per-site basis. I have found this is the easiest way to achieve this functionality.




回答3:


You can try the Google Analytics Opt-out Browser Add-on, though it will disable tracking on all sites altogether.




回答4:


how about using the campaign tracking feature to create a specific urm URL you send out to any person you wish to exclude from reports? Then add a campaign filter, how's that?

not sure how long the campaign cookie will be stored, may need everyone to click that camapaign URL every few weeks?



来源:https://stackoverflow.com/questions/11826062/how-to-exclude-self-traffic-in-google-code-from-google-analytics-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!