ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • HubPages Tutorials and Community»
  • Articles Statistics & Metrics

The Simplest Filtering Method to Exclude Traffic from Your Internal Computers in Google Analytics, No IP Address Lookup!

Updated on June 19, 2013

Don't spend time trying to analyze your Google Analytics traffic until you've followed this simple guide to excluding your own traffic from the analytics results. When your web site has relatively few visitors, your influence as the author of the web site on the traffic statistics may make them nearly meaningless.

In about one minute you can follow these easy instructions to ensure that the traffic you see in Google Analytics is an accurate representation of the visitors that you care about. You will not need to download any software or browser plugins and you can follow the instructions in the web browser of your choice.

Google Analytics traffic filtering is applied for any new traffic coming in, so your existing statistics will not be changed. If you decide to start another web site, remember this advice as a first step to keep your traffic graphs clean from the start.

Update: Our easy commands below have been updated to support the recently released Asynchronous Analytics tracking. - Jan. 27, 2010

Part 1: Give your computer a name

The first step to excluding internal traffic from your web site traffic stats is to give Google Analytics something unique by which to identify you.

  1. Go to any page on your web site that uses Google Analytics tracking. If you use HubPages, you can follow these instructions without leaving this page!
  2. Copy the entire one-line code below and paste it into your web browser address bar, entirely replacing the current web address. You may need to retype javascript: at the beginning of the URL after pasting.
  3. Replace Unique Word near the end with any word of your choice, always use the same word to avoid having to make changes in Analytics.
  4. Once you have changed the code, press the Enter key.
  5. If your unique word appears in a popup box it has been successfully set.
  6. Repeat these steps on all of your sites that use Google Analytics, once per domain (i.e. only once for all of your content at hubpages.com, and once again for yourwebsite.com). If you use multiple web browsers, these steps may need to be repeated in each.
javascript:void(function(w){try{_gaq._getAsyncTracker()._setVar(w)}catch(e){try{__utmSetVar(w)}catch(e){pageTracker._setVar(w)}}alert(w)}('Unique Word'));void(0);

No popup?

Recent browser updates may disable the ability to run this code from the URL bar. Try these instructions instead.

Firefox: go to the Tools menu > Web Developer > Web Console. You will see a > with a blinking cursor beside it. Paste the code in the article then press the Enter key. To close the console, hit the x button at the top of the console panel.

Chrome: click the wrench icon then select Tools > Javascript Console. You will see a blue >, click in that area and paste the code above. To close the console, hit the x button at the top of the console panel.

This code tells Google to store a specific word on your computer that will identify you when you are browsing your web site. Don't worry, your unique word can't be seen by sites other than your own.

Troubleshooting

If you experience an issue with the code above or with your traffic filtering, please post a comment below and the author will be glad to help. Be sure to read other recent comments to see if your problem has already been reported and to try potential fixes.

As web browsers adapt to new security and usability standards, some of the technology required for this script may become outdated. If your issue is not solved in the comments or in the blue box to the right, please report it with as much helpful info as you can gather.

Just hit Enter or click the button that you would use to go to a web site. The page you are viewing will not change, but you will see an "OK" dialog confirming the word that you chose.
Just hit Enter or click the button that you would use to go to a web site. The page you are viewing will not change, but you will see an "OK" dialog confirming the word that you chose.

Part 2: Tell Google Analytics to filter out your traffic

The Google Analytics Filter Manager is a very powerful tool for filtering your content. The Filter Field dropdown which you will see soon lists all of the different traffic identifiers which you can use to customize your Analytics reports.

  1. Go to the Google Analytics Filter Manager (you can always find a link to this page at the bottom of your Analytics homepage)
  2. Click the + Add Filter link which is located at the right of the gray bar.
  3. Type a filter name, something like My Traffic or Author Filter.
  4. After Filter Type, select the Custom Filter option.
  5. In the Filter Field dropdown, select User Defined (near the top of the list).
  6. In the Filter Pattern text box, type the unique name that you used in Part 1.
  7. Finally, in the Available Website Profiles list, select your web site address (i.e. hubpages.com) and click Add » to move your site to the Selected Website Profiles list. Repeat this step for each web site that you track with Google Analytics.
  8. Click Save Changes at the bottom of the page.

This simple setup will allow you to exclude yourself from your Google Analytics statistics whenever you visit your web site from your home computer. If you ever switch computers, just follow the steps in Part 1 using the unique word that you've chosen to filter.

Find the Filter Manager link below your Website Profiles list on the Analytics Settings home page.
Find the Filter Manager link below your Website Profiles list on the Analytics Settings home page.
Click the Add New Profile link.
Click the Add New Profile link.
Type a name for the filter. Choose Custom filter for the Filter Type. Choose User Defined for the Filter Field. Type your unique word as the Filter Pattern. Add any sites from which you wish to exclude yourself. Click Save Changes.
Type a name for the filter. Choose Custom filter for the Filter Type. Choose User Defined for the Filter Field. Type your unique word as the Filter Pattern. Add any sites from which you wish to exclude yourself. Click Save Changes.
If you have not installed a unique Google Analytics exclusion word on the current computer, you will see this when verifying your unique word. Follow the steps in Part 1.
If you have not installed a unique Google Analytics exclusion word on the current computer, you will see this when verifying your unique word. Follow the steps in Part 1.

How to Check If Your Browser is Filtered Out

If you are not sure whether you set a unique word or do not remember what it is, try these simple steps:

  1. Go to any page on your web site that uses Google Analytics tracking.
  2. Copy the entire one-line code below and paste it into your web browser address bar.
  3. No changes are necessary, just hit Enter.
javascript:alert((/__utmv=.+?\.(.*?)(;|$)/.test(''+document.cookie))?RegExp.$1:'No unique word');void(0);

IE 9 Users

IE 9 will remove the javascript: portion of this link when you paste it into the address bar, you will have to type that portion manually.

Your current unique word will appear in a dialog window which you can then close. If you see a different word than you set up in Part 2, you should follow the directions in Part 1 to apply the correct unique word. If you still see the wrong code after following the directions in Part 1, clear your cookies and try again - a previously set unique word cookie may be overriding your new setting. Be sure to do this step in each web browser that you use since the unique word may or may not be shared between browsers.

Translations of this article

Thank you to those readers who have taken the time to translate these instructions, your work is appreciated!

If you have written or found a different translation, please post it in the comments.

Why is This the Easiest Way to Exclude Myself from Analytics?

Unless you have read other articles already and tried to exclude yourself from Google Analytics, you may not appreciate how much simpler this is.

  • You can use the same unique word on any computer without ever returning to the Google Analytics Filter Manager.
  • You do not need to modify any of the code on your existing page.
  • You do not need to look up the IP address for your home network and all other places where you want to browse your web site.
  • IP addresses, the codes that uniquely identify computers and home networks, change often and without warning; your unique word will not change.
  • It works with both the old and new Google Analytics and Urchin tracking code.


Automatically identifying multiple authors

If you have multiple authors, you can make a simple addition to the HTML code of one of your author-only pages which will automatically add your unique code whenever they sign in. By making this change you can avoid contacting your entire writing staff with the instructions above while still ensuring that they are not tracked.

  1. Add the following snippet to your HTML code, it can appear anywhere on the page.
  2. Edit the UniqueWord to something meaningful, such as "authors"
<script type="text/javascript">
setTimeout(function (){var s=function(v){
try{_gaq._getAsyncTracker()._setVar(v)}catch(e){
try{__utmSetVar(v)}catch(e){
try{pageTracker._setVar(v)}catch(e){
setTimeout(function(){s(v)},500)}}}
};s('UniqueWord')}, 500);
</script>


NOTE: In order for this code to work, the Google Analytics code snippet must also be included somewhere on the same page, before or after the above code. Some admin systems such as WordPress may not include analytics tracking on administrative pages. While it may seem counterintuitive, you may need to paste your Google Analytics code snippet into the admin page as well in order to make the above code work.

Ignoring all visits to your hidden page

Your first visit to this author-only page will still be logged in Analytics. In order to prevent that, you can create a second filter in Analytics following the instructions above but instead filtering on the field "Request URI." For this filter, if your hidden page is at www.mysite.com/path/to/hiddenpage.html you would type "path/to/hiddenpage.html" as the filter pattern. That should prevent all of your visits to the hidden page for the purpose of installing the code on a new computer from being tracked.

Reader Feedback

Are these instructions easy enough?

See results

Multiple user class segmentation, alternative to exclusion

If you have multiple authors, you may want to track their activity as well, just segmented out from normal users. This is also very simple to do. The instructions below will create a new Website Profile for your staff which you can access from the Google Analytics homepage.

  1. Go to the Google Analytics Create a New Website Profile page (you can always find a link to this page at the bottom of your Analytics homepage)
  2. Select Add a profile for an existing domain.
  3. Choose your web site from the dropdown list and name the profile something distinguishing, such as Blog Co-authors.
  4. Follow the instructions in Part 2, but change the selection below Filter Type from Exclude to Include. This will exclude any traffic that doesn't match your unique word.

Google is a trademark of Google, Inc.

Google Analytics logo is from gaforflash, distributed under Apache License 2.0

Dream/Reality graphic designed by stock.xchng contributor iamwahid

Screenshots taken in Ubuntu 9.04 using Radial theme.

Reader Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      Mathieu 2 years ago

      Hi,

      I thought of another approach using HTML5's localStorage feature. The advantage over the cookie is that when you clean your browser's cookies, localStorage values remain.

      I've written a blog article about it here:

      http://www.mendoweb.be/blog/google-analytics-exclu...

    • ravinderkumarshar profile image

      ravinder kumar sharma 2 years ago from india

      my google analytics are showing any data. my webmaster tools sub domain is not verify with in google analytics.say as Verification failed for http://hubpages.com/@robin using the Google Analytics method (less than a minute ago). The tracking code used by your site is not associated with your Analytics account. please guide me as i am confused very much.please if possible sent me a email so that i can correct the error. my hub sites 2 hubs http://ravinderkumarshar. thanks

    • fritteritter profile image
      Author

      fritteritter 3 years ago from Ohio, USA

      The technique described in this article has been deprecated for quite some time and is not supported anymore in the latest version of Analytics that you are using. Quite unfortunately, the replacement for this single "User-Defined Variable" is a set of "Custom Variables" that are not eligible for filtering (since 2009 when they were introduced). So, the only custom way to filter your data is no longer supported, but it has not been replaced by an alternative.

      I tried to hack it by setting the same cookies as the old tracker, but they seem to be ignored once data is set by the new analytics.js Universal tracker. All of the tracking requests are different in Universal Analytics and it just doesn't support this method. IP address filtering is an alternative...

    • profile image

      Sergi 3 years ago

      Thank you for your great tutorial. Unfortunately, it doesn't work for me, the message is as follows:

      uncaught exception: ReferenceError: pageTracker is not defined

      Also tried changing to trackPageview with no success... Help!

      Tried with http://www.aestivum.com

    • londonaccountants profile image

      Goringe Accountants 3 years ago from London, UK

      Great analysis, thank you for sharing! Now if I could only get rid of semalt!

    • fritteritter profile image
      Author

      fritteritter 3 years ago from Ohio, USA

      Odd, is that .VAgRi2SSyco bit your unique word? Could it be a browser extension that you have installed in Chrome? Your web site does not show a hash like that when I use the code to store a unique word, so I'm not sure whether it is a problem with the site or the browser.

      Try opening Chrome in Incognito mode (menu &gt; New Incognito Window) then go to your web site and follow the same steps to install the code. In Incognito mode all of your browser extensions are disabled, so if you still get the strange link addon it is more likely related to the site than the browser.

    • profile image

      Nic 3 years ago

      After some additional digging, I found that the goofy URL addon appears, only when I use Chrome, which was the browser I used to install the javascript code. Firefox seems to work fine.

    • profile image

      Nic 3 years ago

      Doesn't look like this worked for me. After I made this change I noticed that there is addition of some code to the end of the URLs on my page, so when I share my links they don't look great. The link looks like this:

      http://detourswelcome.com/camping-france-maps-chai...

      When it should look like:

      http://detourswelcome.com/camping-france-maps-chai...

      Removal:

      I attempted to remove this by deleting my cookies, but the addition to the URL keeps popping up. Any ideas on how I can remove this javascript from my site and stop the addon code to my URLs?

      Thanks!

    • fritteritter profile image
      Author

      fritteritter 3 years ago from Ohio, USA

      @GRintage are you sure the page you are trying this on has the Google Tracking code installed? Any chance you can send a link so that I can try it myself?

    • profile image

      GRintage 3 years ago

      HEy! I tried to do the first step, but my unique word box wouldn't appear, so I tried to do the blue box suggestion and I don't think that has worked either, when i paste the code in the javaconsole and hit enter it gives an answer in red saying: "Uncaught ReferenceError: pageTracker is not defined" :( what doI do? BLogger stats keep counting my own views and I have tried EVERYTHING, now this... :(

    • ilikegames profile image

      Sarah Forester 3 years ago from Australia

      Extremely well designed Hub, I planned to set this up this week sometime so I'll have to test this out then.

    • profile image

      Libby 3 years ago

      Wow! Thanks...easy to do.

    • profile image

      MP 4 years ago

      Also, for those having trouble finding the filters, click on "admin", and then "all filters". And the "User Defined: in the filter field is way down the list, under "Other".

    • profile image

      MP 4 years ago

      Everything seems to work fine. Used Web Console in Firefox, and in the Apply Filter to Website Profiles all there was "All Web Site Data" so I used this and it seems to be OK.

    • profile image

      Robbie C Wilson 4 years ago

      Has anyone been able to get this to work? I am still stuck at the Apply Filter to Website Profiles as it doesn't give me the option. Can anyone tell me what I am doing wrong? I am using IE 9 as my browser...

    • profile image

      Me 4 years ago

      Thanks. Finally a really good solution. Piwik uses this kind of cookie and I was really wondering why Google wasn't offering it right away.

    • profile image

      Anonymous 4 years ago

      To avoid the "pageTracker is not defined" error message, change the code to say "trackPageview" instead of "pageTracker"

    • profile image

      Robbie C Wilson 4 years ago

      Hi Diannetrussell,

      I got stuck at the same stage as you, all was good until choosing the profiles which I couldn't do. I visited my profile page and it definitely didn't work. Did you get it working in the end?

    • profile image

      chris desilva 4 years ago

      Using Firefox. Tried using the Web Console for Step 1.

      Got "ReferenceError: pageTracker is not defined" msg. Can you help?

    • profile image

      Ashley 4 years ago

      Absolutely the best article I have read on this subject. thank you.

    • profile image

      diannetrussell 4 years ago

      Hi, all good until "available profiles list". None of my websites are on the list, even though they are all on my google analytics account and I can even see them there on the menu bar at the top of the page! There does not seem to be any way from this page of actually adding profiles to the list....

      help!

    • profile image

      Gregor 4 years ago

      hi,

      thank you a lot for the instructions. They are by far the simplest and most elegant solution to the problem!

    • fritteritter profile image
      Author

      fritteritter 4 years ago from Ohio, USA

      Alison, see this comment for updated instructions: https://hubpages.com/community/Google-Analytics-Ea...

    • profile image

      Alison 4 years ago

      I was able to install the code word perfectly, but I am having a heck of a time with part 2 and trying to find the filter manager within Google Analytics. Have they changed the settings?

    • Paul Maplesden profile image

      Paul Maplesden 4 years ago from Asheville, NC

      This article saved me so much time - It's a simple and elegant way to exclude my cputer from Analytics without me having to constantly update my IP address - Quality content, thanks and upvoted.

    • profile image

      Jonathan 4 years ago

      Hi... this is a great contribution. It works great and it is easier than the bodyOnload kind of solutions. ThankS!

    • fritteritter profile image
      Author

      fritteritter 4 years ago from Ohio, USA

      Yes that is wrong, the www.freebiesnetwork.biz address needs to be removed first.

    • profile image

      Debbie 4 years ago

      Hi, am trying to do this in my web browser rocketmelt and am doing it like this :

      www.freebiesnetwork.bizjavascript:void(function(w){try{_gaq._getAsyncTracker()._setVar(w)}catch(e){try{__utmSetVar(w)}catch(e){pageTracker._setVar(w)}}alert(w)}('userdebbiefn'));void(0);

      this is what am typing on the add bar, is this wrong? please help.

      Thanks!

    • profile image

      Mark 4 years ago

      I had it working a few days ago, now the code gives an error while trying to set up others to exclude...odd...

    • molometer profile image

      molometer 4 years ago

      Very useful information, great to get a realistic set of data without the distorting influence of out own activity.

      Sharing on twitter.

    • fritteritter profile image
      Author

      fritteritter 4 years ago from Ohio, USA

      Interesting Dan, I see the same thing after updating. Firefox is no longer allowing access to the page context from the address bar. I wonder if that is a bug or a security fix.

      Alternatively, you can open the Web Console (Cmd+Alt+K or Tools » Web Developer » Web Console) and paste the same code there.

    • profile image

      Dan 4 years ago

      Hi fritteritter,

      Using your code since a long time, but with Firefox 16 (for Mac) it doesn't seem to work anymore. No clue why. Not getting a pop-up window. Works like a charm on Safari and Opera.

    • profile image

      Jack Dunning 4 years ago

      Another novice here. Tried the method and got no pop up. You mention fixes for Firefox and Chrome but not Explorer, if you don't get a pop up. I have Explorer.

      Thanks

      Jack

    • profile image

      chowgypsy 4 years ago

      Thanks--I'm willing to try anything!

      I made a custom filter and put my unique word where it asked for "filter pattern." Do I need to reselect it frequently if I always stay logged in to GA? i'm not sure what you mean by this.

      Thanks for the help!

    • fritteritter profile image
      Author

      fritteritter 4 years ago from Ohio, USA

      chowgypsy, you can create an Advanced Segment for: Exclude "User Defined Value" Exactly matching your unique word. Unfortunately there does not seem to be a way to enforce the use of that segment, so you may need to reselect it each time you log in to GA. It is possible to create a "shortcut" on your GA dashboard that will apply that advanced segment but I do not think there is a better solution at this time.

    • profile image

      chowgypsy 4 years ago

      Hello, thanks for the concise explanations, but unfortunately I do not have the option to apply the filter to website profiles. I can't access the former analytics interface, either.

      Any suggestions?

    • fritteritter profile image
      Author

      fritteritter 4 years ago from Ohio, USA

      Be sure when you paste the code into the address bar that the javascript: portion is not removed. Browsers have started removing this from pasted URLs, probably for general security. You may need to type the javascript: prefix manually after pasting the code.

    • profile image

      Mark 4 years ago

      Hi,

      I've tried this in Firefox, IE and Chrome and nothing happens, apart from Chrome which just does a Google search for the code.

      I had implemented this years ago and it worked before, it just doesn't seem to be working now in any browser.

      Any ideas?

    • profile image

      Jonathan 5 years ago

      This one really works. Thanks!

    • profile image

      Milli Thornton 5 years ago

      Whoops, sorry. Just realized another Hubber answered my question with a link to your Hub. But that's still good. :~)

    • profile image

      Milli Thornton 5 years ago

      Thank you for answering my HP question with a link to this page. Much appreciated and very helpful so far. I managed to do the first step easily.

      The second part is giving me a problem. I'm not able to access the Filter Manager. Your link doesn't work, and even typing it into my address bar doesn't work. It just keeps defaulting to the home page of my Google Analytics account. Any suggestions?

    • pythian2 profile image

      pythian2 5 years ago from UK

      Great tips and very detailed making no assumption on level of knowledge. I'm off to try it now.

      Thankss

    • profile image

      Andre Willey 5 years ago

      Oops, please ignore the above two posts, I think it was actually working OK but I couldn't find the cookie file (was in a subfolder). Now working fine in IE9, Chrome, Firefox and Safari - and I even found out how to set up an extra Google Analytics profile which ONLY displays my visits (rather than excluding them) so I can 100% verify the settings are working. Thanks for the help and tips.

    • profile image

      Andre Willey 5 years ago

      That page I referred to in my last post, www.portorleans.org/exclude-tracking.php, works fine on the same machine using Firefox by the way, and a Firefox cookie is created.

      Ideally I'd like to use the inline javascript code version, and just use a bit of PHP to only run it when I visit the site's homepage while logged in as the Admin user (me), then I can just leave it there and forget about it for when I happen to use different machines.

    • profile image

      Andre Willey 5 years ago

      Hmm, I can't seem to get this working on IE9 on either of my Win7 PCs. Works on Win7/IE8 at work though. I tried both the body code and the inline javascript version, but neither actually generate a cookie (I've searched through the file contents in the Windows cookies folder for the wording I was adding). The exclude-cookie code is embedded within a standard page layout on my site, so not sure if something in there is messing with it? Anyway, it's located at www.portorleans.org/exclude-tracking.php if anyone could maybe have a quick look at it for me to see why it does not actually create the new cookie? Oh, I also tried the method of putting the javascript line into the address bar, and while it popped up the correct alert box saying it had worked, still no cookie. Thanks!

    • profile image

      CrystalWaters 5 years ago

      I do not see the Apply Filter to Websites fields in Google Analytics. Will your solution still work?

    • profile image

      Daniel Piñero 5 years ago

      Hi. I tried both metods: pasting the code and inserting the script in a separate page (http://danielpinero.com/exclude.html). Then created the filter in Google Analytics.

      The popup appears to me with the name "test", but visits keep showing up in Google Analytics.

      What could be the problem? Thanks in advance.

    • profile image

      Tim 5 years ago

      Tying that javascript in the address bar may no longer be sufficient, instead your browsers will provide an alternative place to put in the code, for example in firefox it's firefox, tools, web developer, scratchpad

      paste it there

    • louromano profile image

      louromano 5 years ago

      Excellent! Thank you. Much easier than other methods I read about in Google guides. Great hub.

    • profile image

      Stuart Edwards 5 years ago

      Hi there! Does this tutorial still work with Google Chrome?! Looks really good. Just don't want to run through it all and it not work!

      Thanks

    • profile image

      Cary 5 years ago

      Very clear and concise - even included pics for us visual learners. Much appreciated!

    • profile image

      Miroslav 5 years ago

      Yes, I noticed that before and fix it now, but filter code still not working.

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      Thanks for sending the link, it works fine for me in Chrome 17.0.963.56 though. I do see one potential problem on that site which could cause inconsistencies across various browsers.

      Your Google Analytics script tag is between the html and head start tags, which is invalid. That code needs to be placed after the opening head tag and before the closing /head tag, otherwise it may be ignored by the browser as invalid HTML.

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      Miroslav, can you post a link to the site that it is not working on?

    • profile image

      Miroslav 5 years ago

      Hi,

      thank you for answer, but I did deleted cookies and it's still not working, I have a filter at home and work, and it is only working on Firefox (work and home) and Opera at home, other than that, it's not working.

      In Chrome I have this message: ReferenceError: pageTracker is not defined.

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      @filterama: The Google Analytics web service was recently updated, and the "New Version" no longer includes the ability to manage filters. At this time it is unclear whether Google is phasing out Filters entirely, or if this is just an oversight in the new interface. You can still add filters to your profiles using the old interface here: https://www.google.com/analytics/settings/home

      @Miroslav: do you mean that the scripts do not work, or that they seem to work but your traffic is still recorded? The first troubleshooting step I usually recommend is to delete all of the cookies in each browser for your site. It is common that an old cookie will override the new one due to different paths or domain masks.

    • profile image

      MIroslav 5 years ago

      Hi,

      I only managed to filter my traffic on Firefox 10.0.2, I can't do it on IE9, Opera, Chrome (javascript console) and Safari and all of them are new versions of browsers on Windows 7 Professional OS, although it was working before on every single browser.

      Do you have any sugestions or did you have problem like this.

      Thank you

    • profile image

      filterama 5 years ago

      Hi there. I got to the end, but couldn't find the Available Website Profiles list in the latest version of Firefox.

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      Glad you found it, thanks for following up.

    • profile image

      Dan 5 years ago

      Hmm thanks fritterritter, think I found the bugger.

      In Google Analytics' script the account no. somehow dropped a 0 at the end, so the script I copy/paste first ended with 1-10, but now I saw it's listed as 1-1...

      No clue how that could have happened.

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      If you pasted the code in your address bar it doesn't matter, but if you added the version in a script tag to your html on a public page that would be an issue.

      What is the address of the site?

    • profile image

      Dan 5 years ago

      Thanks FR - well still no reporting... The Exclude filter looks fine and the Unique Word script was installed when visiting main page...

      Don't quite get this, what you mean with "public page"? Isn't every published page public?

      Or does it have to be installed on a private page?

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      The only ways it could filter out all of your traffic are:

      1) if the filter type were something other than Exclude, like Include which would only show traffic from users with that unique word.

      2) if the script were added to a public page, so that it adds the unique word for all of your visitors.

      I recommend visiting a few pages on a different computer, or clearing your browser cookies and then visiting a few pages, so that you can determine with certainty whether the tracking is or is not working.

    • profile image

      Dan 5 years ago

      Hi, can it be that when the script with a Unique Word is used together with the Google Exclude filter that Google Analytics reporting doesn't work anymore?

      That's what I did - and since well over 48 hours nothing is reported. Just zeros.

      If so, how to undo the Unique Word script?!

      Or what may the problem be? Usually I get reports within a few hours.

    • profile image

      Benjamin Welby 5 years ago

      Thank you!

    • profile image

      FrancescoDS 5 years ago

      Awesome solution, the script you suggested to Sanjin worked on my iPhone and iPad too (Safari and Atomic Web Browser).

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      Just a bit more info... the _setDomainName difference does not actually cause any problems with the cookies; as soon as you load the stop counting page, that cookie is available on your main site. The problem, though, is that Google Analytics deletes all the cookies from the stop counting page when you reload the main page due to the domain mismatch.

      I tried running the same JS snippet to install that cookie on a page that uses .wel.by as the domain and the cookie did not disappear anymore.

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      Benjamin,

      Thanks for posting the link. The problem appears to be that on your stopcountingme2.html page, the Google Analytics domain name is set to wel.by whereas your main site sets it to .wel.by. The latter causes the cookie to be preserved across all subdomains of wel.by - in this case, bm.wel.by. You should be able to fix it by changing this line on the stop counting page

      _gaq.push(['_setDomainName', 'wel.by']);

      to this

      _gaq.push(['_setDomainName', '.wel.by']);

    • profile image

      Benjamin Welby 5 years ago

      Hi fritteritter,

      I've tried your method but for some reason I can't get the cookie to stick.

      If I visit http://bm.wel.by/stopcountingme2.html and then run the javascript alert I get a pop up giving the unique phrase.

      But if I then browse to another page and run the alert it tells me no unique word is set.

      I had previously used the method described by Google which used the deprecated pageTracker method and hoped that your instructions would replace that functionality but I don't seem to be having any joy.

      Are there any insights you can lend me? Thanks

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      Jonathan, it's hard to guess what might be wrong, have you read the questions and answers in past comments?

    • profile image

      Jonathan 5 years ago

      Hi, I tried your method, it seems really simple and when I retrieve the word using the code you wrote I get a popup with my secret word. I configured the filter on a profile on Analytics with the same word but Analytics keep tracking my own visits. I am sure I did everything correctly but I must be missing something. Do you have any idea or know about a common mistake that leads to this? Thank you very muchª

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      Keith, in order for the unique word script to work, it has to be used on a page that uses the Google Analytics tracking code. That means that in addition to the unique word script, you would also need to paste the Analytics code used elsewhere on your site. Those steps are only necessary if you have multiple authors and want to automatically prevent their visits from being tracked.

      If you are the only author, you can just follow the steps in the first two sections.

    • profile image

      Keith 5 years ago

      "Some admin systems such as WordPress may not include analytics tracking on administrative pages. While it may seem counterintuitive, you may need to paste your Google Analytics code snippet into the admin page as well in order to make the above code work."

      I have WP and the steps aren't working. I know what the admin page is but I don't know how to paste the GA code in. Nor does it really make sense why I would need to paste the GA tracking code there.

    • profile image

      Srini 5 years ago

      Fritteritter,thanks for quick reply. I tried that already by keeping that code as link on a sample page. I got the alert message after setting with given value. I have Android OS, still I am not seeing any change. Not sure, are we setting the proper value or not? Or something might be changed with new Google Analytics(GA) code. Still GA is showing my mobile visits after adding the exclude word.

    • fritteritter profile image
      Author

      fritteritter 5 years ago from Ohio, USA

      Srini, please try the trick suggested in my reply to Sanjin above to make it easier to enable the tracking code on mobile browsers. Be sure to use the most recent code in case anything has changed since that post.

    • profile image

      Srini 5 years ago

      You should open your web site and paste that code.

      Guys, how could we use the same code on mobile browser? Is it same or different? When I tried, it is not saying any error or showing alter box with my word.

    • profile image

      random 5 years ago

      when i try to run this in firefox, i get message : pagetracker is not defined?

    • profile image

      Cathi 5 years ago

      Thanks so very much! It was easy enough that even I could do it.

    • profile image

      Dany 6 years ago

      Found it. _utmv Expires: March 11, 2012 5AM. Obviously not good for two years. Is there a way to change it?

      May still be having an issue, however. Will post when I know for sure.

    • profile image

      Dany 6 years ago

      I think I found the problem. I went in and looked at the security settings. I had it set to NOT delete cookies, but there is another level where it was deleting them, apparently, on shutdown. I've now changed that (unfortunately the only other options is "until they expires" which doesn't thrill me because of certain other types of cookies), and so far so good.

      Btw, how do I check the _utmv cookie expiration? I don't really know how to do that. I tried googling it with no success. I would like to know myself about the expiry date, although it doesn't seem likely that is the issue after what I found. Still...

    • fritteritter profile image
      Author

      fritteritter 6 years ago from Ohio, USA

      Strange, unless you have Firefox or some computer cleanup software configured to delete all of your cookies, all of the Google tracking cookies should remain intact for at least 2 years. Can you check the __utmv cookie expiration date in Firefox? A plugin like https://addons.mozilla.org/en-US/firefox/addon/edi... could be used to extend the expiration date. Interested to know whether the expiration date is set properly or something else is deleting the cookie... quite a hassle

    • profile image

      Dany 6 years ago

      Hi there. Yes, this page looks great now. Now for some other annoying news. Firefox seems to be giving grief in all quarters. Using the webconsole route works fine as long as you don't turn off or restart the computer. When you do, Firefox apparently wipes out your lovely code because I start showing up on analytics. So I have to remember on both computers to redo it every time. So far Chrome is behaving itself, so I may have to switch to using THAT browser (sigh).

      Any way around that little nuisance? As always, thanks for your great work and help!

    • fritteritter profile image
      Author

      fritteritter 6 years ago from Ohio, USA

      Thanks Dany. It should be fixed now, unfortunately HubPages is not always the best platform for sharing code.

    • profile image

      Dany 6 years ago

      Hi again,

      Don't know if you're aware of this, and maybe it doesn't matter (other than aesthetically) but when this page is brought up in Firefox, it spreads the exclude and the check your browser codes all the way across the page. The exclude coded even runs under a banner ad and off the page! It's fine in IE and Chrome.

    • fritteritter profile image
      Author

      fritteritter 6 years ago from Ohio, USA

      Thomas, use the code in the "How to Check If Your Browser is Filtered Out" section within the web console to check that.

      A more thorough way to check whether your traffic is filtered out of Analytics is to create an "orphaned" page that is not linked to by any other page. Visit the page after following the steps above, then check a few days later to see if the secret page appears in your Analytics.

    • profile image

      Thomas 6 years ago

      Using latest Firefox. Tried the Web Console solution. How do you test it to ensure that the site is set up with the cookie?

    • fritteritter profile image
      Author

      fritteritter 6 years ago from Ohio, USA

      Glad that it worked!

    • profile image

      Dany 6 years ago

      Yes!!! fritteritter you're the best! Thanks so much for the lightening-fast response and fix! I love this code!

    • fritteritter profile image
      Author

      fritteritter 6 years ago from Ohio, USA

      Dany, thanks for reporting that problem. I checked this out on the latest Firefox on OS X and had the same problem. It looks like Firefox has isolated the data available to the page so that it is no longer available from the URL bar. There is an annoying workaround which I will probably have to add to the article:

      In the Firefox menu, go to Tools > Web Developer > Web Console. You will see a > with a blinking cursor beside it. Paste the code in the article then press the Enter key. You can close the web console by going through the menu again, or hit the x button at the top of the console panel.

    • profile image

      Dany 6 years ago

      PS - I was necessary to redo the exclude code in Firefox last week (have no idea when or why it got removed, possibly on another upgrade), and it worked fine then, so I'm suspecting something with yesterday's upgrade.

    • profile image

      Dany 6 years ago

      fritterritter, been using this great code for over a year and LOVE it! Thank you! Firefox, however, is becoming a pain with their updates that blot things out and don't work with certain add-ons anymore.

      It just did another update yesterday and it blotted out the exclude code yet again. When I checked my analytics just now and found myself included, I redid the code, but no cigar. I copy/pasted as usual into the addy bar, hit enter, and... no box, no nothing.

      Popups are allowed for my site, and I also disabled popup blocker completely while doing this just to be sure, also cleared cache, and it still won't work. Thanking you in advance for your help!

    • fritteritter profile image
      Author

      fritteritter 6 years ago from Ohio, USA

      There have not been any changes to the Analytics code or account panel that would cause that. It sounds as if you have another cookie overriding that one, at least for certain paths on your site. Please try clearing the cookies in your browser for your site, then set the unique word again and see if the behavior is the same.

    • profile image

      ~Romil 6 years ago

      Has there been any changes recently?

      I used the latest code and Chrome and was able to setup the unique word, however Analytics still counts my visits. Also, every time I restart my PC the cookie gets deleted?

      Could this be a Chrome issue? Let me try Firefox and IE and see.

    • profile image

      keiju 6 years ago

      big thanks

    • profile image

      Katrina Glover 6 years ago

      Just an FYI: been using this script great with no problems but recently had to clear out Chrome cookies and re-do everything. Ran into a problem with Chrome also removing javascript from the beginning. So anyone having any issues with getting this to work with Chrome, make sure you go to the very beginning of the address bar and type in 'javascript:' before hitting enter - otherwise you'll just run a google search.

    • profile image

      Martin 6 years ago

      Works great! Thank you, thank you, thank you :-)

    • profile image

      Nigari 6 years ago

      nice...googling for "analytics dont count me" and find this article. Thanks fritteritter.

    • profile image

      Nigari 6 years ago

      This is amazing! So easy to implement, and easily the best guide for excluding yourself from Analytics to be found on the Internet... Thanks ;)

    • AlexInItaly profile image

      AlexInItaly 6 years ago from Milan, Italy

      I'd been pulling my hair out over this one - until I found this article.

      Excellent work - being bookmarked for future reference!

      Thanks for writing this.

      Cheers,

      Alex

    • profile image

      Brendon Held 6 years ago

      Thanks for the response fritteritter. You were 100% correct. Typing "Javascript" by hand sorted the issue out for me.

      Hugely appreciate your help with this!