• Uncategorized

    Excluding Hits from Google Analytics

    If you want to exclude your own visits to your site from Google Analytics on a per-computer or per-session basis, searching will land you on Google’s help page: How do I exclude internal traffic from reports?. Problem is, the code there doesn’t work with Google’s new-ish asynchronous tracking code. There is no “pageTracker” object any longer, so that’ll throw a nice little error. The replacement for “pageTracker” is to push the custom variable onto the _gaq object, per the new standards. To get this working, make a new, simple HTML page, just including the basics to make the page validate. Include your standard-issue Google tracking code in the head, like…