Analytics
1.9K members online now
1.9K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

n00b question: Filter internal traffic when on dynamic IP/Comcast

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all, I'm fairly new to Google Analytics.

I want to exclude internal (aka my own) traffic to my website. Unfortunately when I am on my home Comcast network, it's a dynamic IP assignment. So the IP address filtering instructions at https://support.google.com/analytics/answer/1034840?hl=en are not helping (public IP address reported by "what is my IP address" on google.com changes often).

I can't seem to find the answer on forums or blogs. Any experts here who know how I can filter my own traffic when I am on a Comcast network and getting dynamic IP assignment?

There is only 1 internal user right now (me).

Thanks!

 

1 Expert replyverified_user

Re: n00b question: Filter internal traffic when on dynamic IP/Comcast

[ Edited ]
Top Contributor
# 2
Top Contributor

 Hello :-)
There are a few ways you can go about this.
1) You can use the browser settings on each of the browser(s) you use at home, to not accept cookies for the particular domain.
or
2) You can create a custom dimension set at user scope and apply it to one single site page that only you have access to and then also create a new View and apply an exclude filter to filter out this particular custom dimension.
or
3) You can use the GA browser opt out (not recommended as then you wont be tracked by GA on any sites).

 

For option #2

To configure the custom dimension -

Select the ADMIN tab and navigate to the property to which you want to add custom dimension.
In the PROPERTY column, click Custom Definitions, then click Custom Dimensions.
Click + New Custom Dimension.
Give the Custom Dimension a Name (for ease of recognition I suggest naming it something like Internal Traffic).
Select Scope (in this instance it needs to be User).
Check the Active checkbox.
Click Create and then click Done.

 

To configure the filter -

When i set up the page with the tracking for the custom dimension, I am going to give the custom dimension that i created
a value of internal.
The filter must be created and applied at the VIEW level, not at the ACCOUNT level

My exclude filter will have the following settings:

internal-filter.jpg

 

Setting up the tracking code -

Create a page on your site that only you will access. Make sure it wont be indexed by search engines and do not link to it from other pages.

Add the following tracking code (replace UA-XXXXX-Y with your Tracking ID and edit dimension1 to reflect the correct index number for the dimension you have created)

<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview', {
  'dimension1':  'internal'
});
</script>
<!-- End Google Analytics -->

 

Once you have created the new page, be sure to visit it in your browser.

Visit the page using all devices and browsers that you use.

Re visit the page any time you clear your browser cookies

There is more information about custom dimensions in the help docs. https://support.google.com/analytics/answer/2709828?hl=en&ref_topic=2709827

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: n00b question: Filter internal traffic when on dynamic IP/Comcast

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks @bronwyn! So, to confirm... by doing this to 1 page (say abc.com/myprivatepage) on my website, and setting up the filter view, if I visit another page (say abc.com/somepublicpage) on my website, GA will know to filter out my traffic as "internal"?

Re: n00b question: Filter internal traffic when on dynamic IP/Comcast

Top Contributor
# 4
Top Contributor
Yes.. make sure the custom dimension is set to user scope in the GA interface when you set it up.
And bare in mind, it can take 24-48hrs for a filter etc to take affect in the report.
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here