Home / Fix guides / Analytics, cookies and GDPR

How to exclude internal traffic in GA4

In GA4 you exclude internal traffic by defining your office IP addresses as internal traffic in the web data stream, then turning on the Internal Traffic data filter. The filter only affects data collected after you activate it, and it does not catch staff who work from home or on mobile data.

If you run a website, you and your team probably visit it more than anyone else. You check the homepage after an edit, test the checkout, and click through forms. If Google Analytics 4 counts those visits, your numbers are wrong, and they are wrong in a way that is hard to spot. This page explains how to exclude internal traffic in GA4, how to check it works, and why the setup often leaks.

What the problem looks like

Most owners notice it indirectly. Common signs:

  • Visits from your own city or region are suspiciously high.
  • Your most viewed pages are the ones you edit or test most often.
  • A small site shows a steady stream of sessions even in quiet weeks, and many come from your own team.
  • Conversion rates look low because your test visits never buy anything, or look high because you submitted the contact form ten times.
  • Engagement time and bounce figures change whenever someone redesigns a page and tests it.

On a site with a few hundred visitors a month, a handful of people reloading pages all day can distort the whole picture.

Why it matters

Analytics is how you decide what to fix, what to advertise and what to drop. Inflated traffic makes a weak page look popular. Test purchases and form submissions can show up as real conversions, which affects any ad campaign that optimises on them. Agencies and freelancers who report on your site may also be reporting numbers that include their own work.

There is also a trust angle. If you show figures to a partner, an investor or a client, you want them to be real visitors.

How to check if your site has the problem

You can check for free in a few minutes:

  1. In GA4, go to Admin, then Data collection and modification, then Data filters. Look for a filter named Internal Traffic. If it is missing, or its state is Inactive, nothing is being excluded. If the state is Testing, the data is only being flagged, not removed.
  2. Open your site in a normal browser window on your office network, then open the Realtime report in GA4. If you see yourself, you are being counted.
  3. Look at the Admin area for the web data stream, open Configure tag settings, then Show all, then Define internal traffic. If the list is empty, no rules exist.
  4. In a report, look at your own city or your internet provider's region and see how large it is compared to your real audience.

A recurring analytics check, such as week 38 of SiteMonday, looks at your analytics setup and reports whether your own traffic is being filtered out.

How to fix it in GA4

The standard method has two parts: define what counts as internal, then filter it out. Menu names can shift slightly over time, but the path below is where these settings usually live.

Part 1: Define internal traffic

  1. Find your public IP address. Search for "what is my IP" from the office network.
  2. In GA4, go to Admin, then Data collection and modification, then Data streams, and open your web stream.
  3. Choose Configure tag settings, then Show all, then Define internal traffic.
  4. Click Create. Give the rule a name, keep the traffic_type value as internal (or choose your own, but it must match the filter), and pick a match type such as IP address equals.
  5. Enter the IP address and save. Add one rule per location, or use a range (CIDR) if your provider gave you one.

If your office has both an IPv4 and an IPv6 address, add both. Many people only enter the first.

Part 2: Activate the filter

  1. Go to Admin, then Data collection and modification, then Data filters.
  2. Open the Internal Traffic filter. GA4 usually creates it for you.
  3. Check that its value matches the traffic_type value from your rule.
  4. Set the state to Testing first, confirm it works (see below), then change it to Active.

Once a filter is Active, excluded events are dropped permanently. Nothing is retroactive: past visits stay in your reports.

Platform notes

The filter itself always lives in GA4. What differs is how the tag is installed.

  • Google tag installed directly: the rule above is enough. See the GA4 guide.
  • Google Tag Manager: the Google tag sends traffic_type automatically once the rule exists in GA4. If you use a custom setup, you may need to add a traffic_type parameter yourself. See the Tag Manager guide.
  • WordPress: many analytics plugins have an option to skip logged in administrators or certain roles. That is a handy extra, but it only works if the plugin supports it. See the WordPress guide.
  • Shopify, Wix, Squarespace, Webflow: these use their own integration screens to connect GA4. The IP rule and filter are still set in GA4, and the platform guides in this section explain where the connection settings usually sit.

When IP filtering is not enough

IP rules work well for a fixed office address. They fail in other cases:

SituationWhat happens
Home or remote workersTheir IP changes or is not on your list, so they are counted
Mobile dataThe IP is shared and changes, so it cannot be listed
Visitors from your agencyTheir IP is not in your rules

For these cases you have options. Google offers an official browser add-on, the Google Analytics Opt-out Browser Add-on, that stops a browser from sending data. For developers, GA4 has a separate Developer traffic filter for debug mode visits. A more advanced approach is setting traffic_type in Tag Manager based on a cookie that you set only on team browsers.

How to confirm the fix worked

  1. Keep the filter in Testing state. Visit your site from the listed IP.
  2. Check your reports. In GA4 you can use a comparison or the Test data filter name dimension to see which events were flagged as internal.
  3. If your own visits are flagged, set the filter to Active.
  4. After activation, visit again and watch Realtime. You should no longer appear.
  5. Check standard reports the next day. Some data can take 24 to 48 hours to settle.

If you still show up, the usual causes are a wrong IP, a missing IPv6 address, a mismatch between the rule's traffic_type value and the filter value, or a second tag on the site sending data to a different GA4 property.

How to stop it coming back

  • Review your internal IP list whenever you change internet provider, move office or add a location. A provider change quietly breaks the rule.
  • Write down who is responsible for the filter, so it does not vanish when a freelancer leaves.
  • Whenever you add a new tag or move to a new GA4 property, repeat the setup. Filters do not carry over between properties.
  • Keep a second view of the data, such as a test property, if you need to analyse your own behaviour.
  • Recheck every few months with the steps above. A short analytics review, whether done by hand or by a recurring check, catches this early.

Fixing the filter is quick, but the clean data only starts from the day it is active, so it is worth doing sooner rather than later.

Step by step for your platform

Questions

Does excluding internal traffic in GA4 remove past data?

No. The filter only applies to data collected after it is set to Active. Past visits from your own team stay in your reports.

Why am I still seeing my own visits after setting up the filter?

Check that the filter is Active and not Testing, that the `traffic_type` values match, and that you listed both IPv4 and IPv6 addresses. Also confirm your IP has not changed.

How do I exclude people who work from home?

IP rules do not work well for changing home IPs. Use the Google Analytics Opt-out Browser Add-on, or set up a Tag Manager rule based on a cookie placed on team browsers.

Should I start with Testing or Active?

Start with Testing so you can confirm that your own visits are flagged correctly. Switch to Active once it works, because active filtering permanently drops the matching data.

Is my office IP address a privacy problem if I enter it in GA4?

The rule only holds your own office address to recognise your team. It is not data about your visitors, but keep your privacy policy accurate about what analytics you use.

Do I need to repeat this for every GA4 property?

Yes. Internal traffic rules and data filters belong to each property, so a new property starts without them.

Related problems