Monday, February 18, 2008

Excluding internal browser hits, using Google Analytics: a simpler way to set the cookie

Using special cookie value for Google Analytics is the most useful way to exclude internal browser hit counts. However, we have to craft many small web pages, only to set the special cookie value, for each GA tracked sites. After some survey, I found a simpler way to do the same thing (it works for me on Firefox and IE7):
  1. Open the target web site from your internal PC. You must have your GA codes installed on this site before doing this!
  2. Execute this line on the URL input bar:

    javascript:pageTracker._setVar('test_value');

    where 'test_value' is your special cookie value.

  3. That's All! And repeat with all your internal PCs.
This line of code can now be posted on only one web page, or just stored on your PC desktop, for your convenience!

No comments:

Post a Comment