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

Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

Explorer ✭ ✭ ✭
# 1
Explorer ✭ ✭ ✭

 Hi,

Is there any way to block dymaic ip addresses in Google Analytics?Whenever I boot my router each and every time it gets a new IP.So filtering by range or fixed ip cannot help.

 

So what is the proper method of it?

 

 

1 Expert replyverified_user

Re: Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

[ 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, in my scenario i named it Exclude 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: Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Bronwyn,

 

thanks a lot for your interesting comment.

I still have some questions,

I don't see the link between creating a new custom dimension with the name "Internal Traffic" and setting up the filter.

Do I need to change something in the example code? Do I need to upload anything?

GA - Custom Dimension.JPG

When configuring the filter

I can see that you have selected "Exclude internal traffic", where do you get this in the list? I don't have it, sure I'm doing something wrong.

 

GA - Exclude internal traffic.JPG

 

Thanks for the help!

 

 

 

Re: Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

Top Contributor
# 4
Top Contributor

Hi :-)

In your example you have named it Internal Traffic, so select Internal Traffic from the filter fields offered under Custom Dimensions

cd01.png

 

cd02.jpg

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

Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Woepsie, sorry!

I did it to fast,

I've read: Give the Custom Dimension a Name (for ease of recognition I suggest naming it something like Internal Traffic, in my scenario i named it Exclude Internal Traffic).

Thanks for the correction.

Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

Top Contributor
# 6
Top Contributor

Nps, i reread my post and updated the 'destructions' to be a bit clearer :-))

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

Re: Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

sorry for bother again, quite new with GA & dimensions.

You are saying to  "edit dimension1 to reflect the correct index number for the dimension you have created)"

I took a screenshot,

does it mean that I need to change 'SOME_DIMENSION_VALUE' to 'dimension1"?

Or I don't need to change anything since the code already mentions 'dimension1'?

 

 dimension.JPG

 

I'm looking to implement this code into a wordpress site.

Best way would be to put this in the admin.php or dashboard.php?

Any thoughts about how and where to insert it?

 

thanks!

Ruben

Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

Explorer ✭ ✭ ☆
# 8
Explorer ✭ ✭ ☆

Another option, which I've been working on, is called "Hide Me" and is part of the new Chrome extension I'm developing called Da Vinci Tools. There's a switch at the top of GTM and GA and you just have to turn the switch off. From that point on, this GTM container ID or UA# will be blocked, just for you, with this browser, regardless of your IP address. Very handy!

You can get Da Vinci Tools from https://chrome.google.com/webstore/detail/da-vinci-tools/pekljbkpgnpphbkgjbfgiiclemodfpen?hl=en-US

Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

[ Edited ]
Top Contributor
# 9
Top Contributor

Who are you looking to tag as internal traffic?

Any user that logs into WP regardless of their user level (eg does the site have subscribers(or customers) for instance as well as Admins or say Editors?)


I don't recommend editing core WP files or active theme files, it goes against WP best practices and will get overwritten and removed every time there is an update to WP or the theme.

 

There are a number of free WP plugins available that allow you to choose which user level of logged in users to block from being tracked, which do not require any filter or custom dimension setup

I'm not affiliated with them, however I have used this free one in the past and I have always had good results with it from the pov of ease of use and also their support is good. Plugins also offer some other handy features too such as the ability to track file downloads, outbound links etc etc simply from configuration options offered by the plugin

https://wordpress.org/plugins/google-analytics-dashboard-for-wp/

 

eta..
also if just looking to block yourself for example @Stéphane H suggestion for using Da Vinci Tools from https://chrome.google.com/webstore/detail/da-vinci-tools/pekljbkpgnpphbkgjbfgiiclemodfpen?hl=en-US would fulfill that without having to make a heap of code and configuration changes.

 

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

Anybody Can Help How To exclude Dynamic Ip address in Google Analytics

Follower ✭ ✭ ☆
# 10
Follower ✭ ✭ ☆

Hi @Soumik Ghosh

 

You can try a simpler option. There is an extension for web browsers called "Ghostery"

 

All you need to do is install the extension and it will not allow GA to track anything.

 

You can download the extension from the following links:

 

Google Chrome: https://chrome.google.com/webstore/detail/ghostery/mlomiejdfkolichcflejclcbmpeaniij?hl=en

 

Mozilla Firefox: https://addons.mozilla.org/en-US/firefox/addon/ghostery/

 

Here is detailed article about excluding dyamic ip in Google Analytics using Ghostery: 

 

https://www.ohow.co/exclude-dynamic-ip-google-analytics/