Press enter to see results or esc to cancel.

How to Filter Google Analytics Stats for a Perfect Data

Over the past few years I have been using Google Analytics, Clicky, Piwik in combination with WordPress Stats while working on WordPress websites. Yes, when looking to the numbers recorded at all the tracking applications, they are different and this made me to look and take deep dive in order to fix the issues. Also, my primary dashboard is configured in Google Analytics which shows all the relevant information at single look.


Now, while I was checking around and debugging the Analytics report I had to make sure that own people aren’t skewing these Google Analytics data.

The discoveries which I made was surprising, the most active traffic on the website was coming from our team while doing their respective jobs at different pages. Mostly from technology and marketing team. No doubt the analytics data is valuable and I wanted to get it in the purest form possible.

Going further deep into this, I found, Google Analytics was also recording traffic from our IP addresses. Now, I turned out to find solution to this and stopped at Google Analytic’s filters feature where we can exclude our offices IP address.

Filter the Static IP addresses from Google Analytics:

At our office, the IP address used was Static, so, followed the help tutorial here to filter these IP addresses.

Filter the Dynamic IP addresses from Google Analytics:

Further, I also observed that Google Analytics is collecting data while I was browsing website from our home internet connection. At home, the IP address used was dynamic and each time with router reboot the IP address used to change.

To fix this in google analytics, I came with solution to block data collecting domains on individual system through host file. On my Windows machine it is available in C:Windows/System32/drivers/etc/.

Then added the following lines in hosts file and saved it:


On Unix/Linux/BSD systems, you can find hosts file in /etc/hosts/ folder.

On Macs, you can find hosts file in /private/etc/ folder.

You can find the detail tutorial on how-to block access to internet for specific domain from here.

In case if you are planning to learn more on how to setup GA in right way, setup segmentation and more, follow the course by Eugen Oprea, which is available for free of cost at Udemy.



Adam Clark

Ankit, thank you this post. Now we get the latest updates inside our google analytics, which ignore our inside traffic. This was an issue happening for long and now we have solution.

Ankit Prakash

Great to hear Clark, that this worked for you.
Yes, getting right information about the analytics stat is quite useful 🙂

Leave a Comment