blog
How to filter internal traffic (Google Analytics, Plausible etc.)
21.2.2024

How to filter internal traffic (Google Analytics, Plausible etc.)

Imagine your brand new website being launched. Everything is set up perfectly, from the design to the usability and of course - the website tracking. But a few weeks later you get into your analytics to realize that most of the traffic is coming from the places you and your colleagues are situated. Very suspicious! Thing is, your internal traffic is meddling with your analytics results. So how to fix this detestful situation? Here’s the solution.

Blocking the IP-address

As many analytics programs (e.g. Google Analytics 4) offer the function to block IP-addresses through a filter, it’s quite obvious that this could be the solution to the problem. But sadly - for most - it’s not. That’s because the majority of IP-addresses are dynamic and change throughout the day.

It’s possible to buy astatic IP-address from your internet provider and for some companies this might be a good solution. Namely for those companies that insist that most of their employees work in the office. However, remote working and mobile offices are now a big part of the working world. And since we all value flexibility, we don't want that to change, do we?

Don’t get me wrong. If you have a huge company with lots of employees working at the same office, it might still be a good idea to pay for a static IP-address for your headquarters. Even though some of your employees work from home from time to time, the majority of the internal traffic gets blocked this way.

For Google Analytics 4 you find the internal filter-instruction here.

Side note: Be careful about your IP-address-form. Some time ago we had the problem that we paid for a static IPv4-address (old IP-form), yet our IPv6-address (new IP-form) got delivered to Google Analytics, which was still dynamic. What a bummer!

For those companies that aren’t fit for this strategy - do not despair. As we have the solution for each and every individual to block their traffic through a Browser-Plug-in. So keep on reading.

Blocking traffic through a Browser-Plug-in and User-Rules

In our opinion the best way to block internal traffic is to make each employee, who wants to work with your website on a regular basis, install a standard ad-blocking browser extension and apply some filter rules.

Side note: If Google Analytics 4 is the only analytics tool you want your traffic being blocked from, get this Google Analytics Opt-out Add-on (by Google). It’s basically all it does - blocking your traffic from GA4 and it’s designed by Google itself. (Btw. weird method sabotaging your own product, Google. But we take it anyway - thank you.)

Which standard ad-blocking browser extensions should I use?

If you are wondering what ad-blockers we have in mind, we do recommend Adblock Plus or AdGuard. So install one of these plug-ins on all the browsers you like to use. Afterwards follow the upcoming instructions to make sure that you exclude yourself from being counted in your own stats.

Step-by-step instructions

After you added the plug-in to your browser, go into your Adblock Plus or Adguard settings.

Adblock Plus or AdGuard settings

Next click on "Advanced" (Adblock Plus) or "User Rules" ( Adguard ) in the left hand side menu. In the appearing text box insert the following rules and click on the "Add"/"Save" button. Remember to change yourdomain.com with the domain you want your traffic to be blocked from.

AdBlocker user interface
AdGuard user interface

User-Rules

For Google Analytics

||google-analytics.com^$domain=yourdomain.com

||analytics.google.com^$domain=yourdomain.com

For Google Marketing Platform:

||doubleclick.net^$domain=yourdomain.com

For Plausible Analytics:

||plausible.io^$script, domain=yourdomain.com

For Meta Pixel:

||facebook.net^$domain=yourdomain.com

For LinkedIn Insight Tag:

||licdn.com^$domain=yourdomain.com

For HubSpot Analytics:

||hs-scripts.com^$domain=yourdomain.com

||hs-analytics.com^$domain=yourdomain.com

For Mouseflow:

||mouseflow.com^$domain=yourdomain.com

For Abtasty:

||abtasty.com^$domain=yourdomain.com

For Hotjar:

||script.hotjar.com^$domain=yourdomain.com

||static.hotjar.com^$domain=yourdomain.com

For Pinterest Web Analytics:

||pinterest.com^$domain=yourdomain.com

Side note: If you by chance have more than one domain you want your traffic to be excluded from, you don’t have to put the filter for each domain. Just separate the domains by a vertical bar and the rule counts for both or even more. For example: ||licdn.com^$domain=yourdomain.com| your-second-domain.com| your-thrid-domain.com

Return to your website to ensure it works

For testing whether your newly set up filters are working, try this:

If you are using Adblock Plus, open your website in your browser. Then go into the DevMode (click right + inspect). Navigate to the section “Network”. On the left hand side, the box under “Name” should be filling up. If your filters are working, some lines should be marked red with an obvious X upfront indicating that the Request-URL is getting blocked. By clicking on it, you can see in detail which Request-URL it is. If it matches your filter, job well done!

Filter check in DevMode

If you are using AdGuard you have it a bit easier. First go to your website, then click on the AdGuard Icon and “Open filter log”.

Navigating to the AdGuard filter log

If it works, the Request-URL you want to be blocked should be marked red in the filter log.

Filter check in the AdGuard filter log

And that’s it. Now you can indulge in scrolling your website up and down and none of your own traffic will influence your statistics.

Maximum insights, minimal worries

Do you want to comprehensively track your website visitors, but don't know exactly how? We are happy to assist. As a digital agency with a focus on web design, we help you quickly and easily integrate analytics and more in compliance with data protection regulations.
Contact now