Filter your own traffic on Google Analytics

Put this code in your browser address bar and hit enter:

javascript:void(function(w){try{_gaq._getAsyncTracker()._setVar(w)}catch(e){try{__utmSetVar(w)}catch(e){pageTracker._setVar(w)}}alert(w)}('your_keyword'));void(0);

Don’t forget to set the your_keyword as your unique word in Google Analytics filter settings (Cookie method of course).

…and to test if the cookie is set in the browser:

javascript:alert((/__utmv=.+?.(.*?)(;|$)/.test(''+document.cookie))?RegExp.$1:'No unique word');void(0);

Note: Modern browsers will strip-off the javascript part, please use Inspect element on Google Chrome or Developer Mode in Firefox.

Still won’t work? It does for me, at least, so far. Post here, I’m working to find a full-proof method, especially after GA updated with new set of codes.


Comments

One response to “Filter your own traffic on Google Analytics”

  1. Hi,

    It works perfectly with safari, but I can’t manage to get it work on chrome, on Mac !
    Did I do something wrong ?

    :(

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.