Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Alex Chow
4,521 PointsGoogle Analytics Results
Is there a way to exclude myself from the results on Google Analytics? I'm coding my first site and I tend visit it multiple times to test features I've updated and see what I can improve on. I would like to exclude myself to get a more accurate result of people who visit my site.
1 Answer
Riku S.
11,322 PointsIf you have static IP, you can exclude that with Analytics filters.
If you're using Chrome, you can also use Google Analytics Opt-out Browser Add-on https://tools.google.com/dlpage/gaoptout, this might be available for other browsers as well.
One option is to make a code on your site that reads value from url and sets cookie based on that, which disables Analytics when used. For example, www.example.com/?ga=false, you can read GET value for ga, if it's "false" you can set cookie and based on that cookie you disable or enable Analytics on your site. So this way you only need to use given url once, then your browser will remember your status as long as cookie lasts.
Last option is to delete Analytics on your site while your testing.
Hope this helps!