
How to filter internal website traffic when a client doesn’t have a static IP address?
It’s a common challenge in the world of digital analytics. The answer, thankfully, is simpler than you might think. If you’re not using static IP addresses or a Virtual Private Network (VPN), there are elegant and straightforward solutions using browser extensions. Some of them provide an easy way to mark internal traffic directly in your browser.
But which extension to choose?
I ran into this problem myself. I couldn’t find an existing solution that was both simple and flexible enough. Companies I work with use various parameters, not just internal or developer, to filter traffic. So, I built my own Chrome extension to solve it: Traffic Type Marker.

But let’s go from the beginning.
Why Filtering Internal Traffic Matters?
Excluding your team’s or agency’s activity from your analytics isn’t just about tidiness. Here’s why:
- More Accurate Data: The activities of your employees, developers, and agency partners can significantly skew your Key Performance Indicators (KPIs). This is especially true if you have a large team or are frequently testing new user interfaces.
- Cleaner Attribution Models: Internal hits can inflate the number of conversions attributed to the “(direct) / (none)” channel, muddying your understanding of what truly drives results.
- Advanced Use Cases: You might want to trigger, block, or redirect specific events based on the type of traffic. For example, you could block marketing tags for internal users or send developer events to a separate testing property.
❗️Before you set up filtering in Google Analytics, remember these two points:
1. Filters Aren’t Retroactive: They only apply to data collected after they are activated. Your historical data will remain unchanged.
2. Activation is Permanent: Once a filter is set to “Active,” the data it excludes is gone. You cannot recover it later, even if you deactivate the filter. I strongly recommend testing every filter before fully activating it.
Standard Filtering in Google Analytics 4
By default, GA4 offers two ways to filter specific traffic: Internal and Developer.
The principle is similar for both. When you define your internal IP address (or a range of addresses) in GA4, the tracking code begins adding a special parameter to every hit from that IP.
- For internal traffic, this parameter is
tt=internal
. - For developer traffic (when using Google Tag Manager’s DebugView), the parameter is
_dbg=1
.
The main difference is that developer traffic appears in the GA4 DebugView, while correctly configured internal traffic doesn’t show up at all.
How to Set Up IP-Based Filtering in GA4
- Navigate to Admin.
- Click on Data Streams and select your web stream.
- Click Configure tag settings.
- Select the Define internal traffic option.
- Create a new rule, give it a name, and enter the IP addresses you want to filter. You can create separate rules for multiple IPs or use a regular expression (Regex) to include an entire range.
- Activate the filter: Go back to Admin > Data Filters. Filters have three states:
- Testing: Data is not excluded but is marked with a “Test data filter name” dimension. This allows you to verify that the filter is working correctly in your reports.
- Active: The filter permanently excludes data.
- Inactive: The filter is turned off.

Managing traffic_type with GTM
Defining IP addresses directly in GA4 can be limiting. A more flexible and powerful approach is to manage the traffic_type
parameter directly in Google Tag Manager (GTM).
Instead of relying on GA4’s UI, you can create custom logic in GTM (for example, using a Regex Table variable) to determine the traffic type. This gives you much greater control over:
- Dynamically set the
traffic_type
parameter to custom values like office, consultant, or agency. - Block not just GA4 tags but also marketing tags like the Facebook Pixel or Google Ads.
- Redirect events to a separate, test-only GA4 property.

With this method, the IP address is still the source of truth, but way how you handle it is more flexible. For server-side GTM (sGTM), this is especially easy, as every event automatically includes an ip_override
parameter that you can use for filtering.
Traffic Type Marker
This brings us back to the original problem: what if you don’t have a static IP address?
That’s where Traffic Type Marker comes in. The extension works by saving a flag you define (e.g., internal
, client
, or anything else) into your browser’s Session Storage for the specific domains you choose. You can select from predefined values or set your own custom one.

From there, you simply create a Custom JavaScript Variable in GTM to read that flag from Session Storage. The value you retrieve can then be used to set the traffic_type
parameter, block tags, or trigger other custom logic.
function() {
var trafficTypeMarker = sessionStorage.getItem('traffic_type');
if (trafficTypeMarker) {
return trafficTypeMarker;
}
if ({{Debug Mode}}) {
return "developer";
}
return null;
}
The setup is simple for the end-user. You, the analyst, prepare the logic in the GTM container. Your client or employee only needs to install the extension, set their traffic type, and turn it on. It works reliably without anyone needing a static IP address.
Building an extension
Building a Chrome extension is easier than you might think. Simple extension runs on four files:
manifest.json
– extension metadatapopup.html
– layout of the settings windowpopup.css
– styling- JavaScript – logic and functionality
To begin testing, navigate to chrome://extensions
and enable Developer Mode. This allows you to use the “Load unpacked” option to select your project folder and install the extension locally. After making any changes to the source code, simply return to this page and click the Reload button on the extension’s card to instantly apply the updates in your browser.
You don’t have to publish an extension on the Chrome Web Store to use it – you can always import it manually. However, publishing makes it available to a wider audience. The process requires a one-time $5 developer registration fee. From there, you just need to submit your extension’s details and assets for Google’s review. For Traffic Type Marker, this approval only took a few days, with subsequent updates being approved even faster.

Final Thoughts
I genuinely hope the information in this article has been useful for you. Achieving clean, reliable data is important. Every decision we make is built on the foundation of the data we collect, and filtering out internal noise is a important step in ensuring that foundation is solid.
My goal in creating the Traffic Type Marker extension was to provide a simple, flexible, and accessible solution to a problem I’ve faced myself. I encourage you to install the Traffic Type Marker extension and see how it works for you and your team.
Thank you for reading, and would love to hear your feedback!