Learn to Code by Making Art
Learn programming while your create computer art by copying code from my free guide.
https://splashofcode.com

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hiding_your_own_traffic_from_google_analytics [2009/02/01 18:01] (current)
Joel Dare created
Line 1: Line 1:
 +====== Hiding Your Own Traffic From Google Analytics ======
  
 +I recently setup a Google Analytics account on this site in order to get a "​second opinion"​ of my traffic (compared to my regular site statistics). ​ What I noticed pretty quickly is that my own traffic was poisoning my results. ​ So, I set out to hide my own traffic.
 +
 +Google Analytics offers a couple different ways to hide your own traffic. ​ Basically, you setup a filter and filter traffic based on some criteria. ​ At first, I considered doing it by IP address, but I regularly make connections from wireless access points at home, at work, on trains, at relatives homes, and even at restaurants. ​ It would be pretty difficult to block all those dynamic IP addresses.
 +
 +My next idea was to setup a special sub-domain, such as example.joeldare.com,​ and then to filter on that.  Right away, I see two possible problems with this approach.  ​
 +
 +  - I don't want the general public to use my hidden domain name.
 +  - I don't want to accidentally use my regular domain name.
 +
 +Solving both problems was easy.  Here are the steps I took.
 +
 +  - Setup "name based hosting"​ on my web host in order to accept requests from my new hidden domain.
 +  - DO NOT set the domain name up on a public DNS server, preventing the public from using it.
 +  - Setup the hidden domain in the host file on my home and work computers.
 +  - Setup invalid entries for my domains in the host file on my home and work computers, breaking the regular domains, but only for me.
 +
 +That's it.  Now I can access the site through my hidden domain name, I can't accidentally use the real domain name, and the general public can't easily use my hidden domain name.
 +
 +Finally, at Google Analytics I setup two profiles so that I can see my traffic as it actually is and also with my own traffic excluded.
Learn to Code by Making Art
Learn programming while your create computer art by copying code from my free guide.
https://splashofcode.com
comments powered by Disqus
hiding_your_own_traffic_from_google_analytics.txt · Last modified: 2009/02/01 18:01 by Joel Dare