16

I have integrated Google Sites website with Google Analytics and I access the website frequently to add more content. I want Google Analytics to track visits from real visitors only. How can I configure it to exclude or filter out my visits?

1

2 Answers 2

21

You can use the Google Analytics opt out browser add-on.

You can also block your own IP address. Source

If you want to exclude internal traffic from appearing in your reports, you can filter out a specific IP address or a range of IP addresses. You can also use cookies to filter out visits from particular users. We'll explain how below. To exclude by IP address:

  1. Click Filter Manager from the Analytics Settings page
  2. Enter a Filter Name for this filter
  3. From the Filter Type drop-down list, select Exclude all traffic from an IP address
  4. The IP address field will auto-populate with an example IP address. Enter the correct value. Remember to use regular expressions when entering any IP address. For example, if the IP address to filter is:

    176.168.1.1
    then the IP address value will be:
    176.168.1.1

    You may also enter a range of IP addresses. For example: Range: 176.168.1.1-25 and 10.0.0.1-14 IP address value : ^176.168.1.([1-9]|1[0-9]|2[0-5])$|^10.0.0.([1-9]|1[0-4])$

    For help finding the correct expression for your range of IP addresses, use our tool: http://www.google.com/support/googleanalytics/bin/answer.py?answer=55572

  5. Select the profiles to which this filter should be applied in the Available Website Profiles box

  6. Click Add to move the selected profiles into the Selected Website Profiles list
  7. Click Finish to save this filter, or Cancel to return to the previous page

You can also block yourself with a cookie

To exclude traffic by Cookie Content

Note: This is an advanced alternative to the previous method.

To exclude traffic from dynamic IP addresses, you can use a JavaScript function to set a cookie on your internal computers. You will then be able to filter all visitors who have this cookie from appearing on your Analytics reports.

How to exclude traffic by cookie:

  1. Create a new page on your domain, containing the following code:

    <body onLoad="javascript:pageTracker._setVar('test_value');">

    (Please note that this code is in addition to the Google Analytics tracking code that you have on every page of your website.)

  2. In order to set the cookie, visit your newly created page from all computers that you would like to exclude from your reports.

  3. Create an Exclude filter to remove data from visitors with this cookie. Follow these instructions http://www.google.com/support/googleanalytics/bin/answer.py?answer=55494 to create a filter with the following settings:

Filter Type: Custom filter > Exclude
Filter Field: User Defined
Filter Pattern: test_value
Case Sensitive: No

3
  • Thank you very much for your answer. I think the only thing that should work is the browser add-on because JavaScript is not allowed in Google Sites. However the add-on acts on all websites not just my site and there is no way to configure it. For the time being I will install it on FF and use it for edits and use Chrome for my ordinary browsing. This should do the trick.
    – M.Sameer
    Jul 6, 2011 at 19:02
  • And if you delete browser cookies will the plugin still work???
    – user13703
    Mar 1, 2012 at 10:41
  • John, you might want to put the HTML in point 1 of the Cookie solution in back-ticks, so it actually is visible. Mar 13, 2013 at 18:06
0

The forum here http://productforums.google.com/forum/m/#!topic/analytics/NTHhcXNvE3A says that the JavaScript above does not work with the new asynchronous code and gives some additional information on setting a cookie.

1
  • The link is broken.
    – Rubén
    Aug 10, 2018 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.