Analytics and tracking
How do I exclude my own visits from GA4?
Define your internal traffic by IP address, then create a data filter that excludes it. Leave the filter in testing state first to check it, then activate it. An active filter changes the data permanently and does not affect past data.
Published . Last updated . By Hevaris.
What does an internal-traffic filter do?
It removes visits from addresses you list, so your own testing and browsing do not appear in your reports. It works in two parts: a rule that marks internal traffic, and a filter that excludes what was marked.
Google says the rule tags matching events with a traffic_type parameter, whose default value is “internal”, and that an exclude data filter then removes events carrying it. This applies to web traffic only, not app users.
How do I set it up?
Set it up in three stages: define the addresses, create the filter in testing state, and activate it after you have checked it. You need the Editor role on the property, according to Google.
- Define internal traffic. Google says internal traffic is defined by IP address or ranges, including IPv4 and IPv6 addresses.
- Create an exclude filter for the internal traffic you defined, and leave it in testing state.
- Check it. In testing state, Google says the filter tags matching data with a dimension so you can validate it, without removing the data.
- Activate it when the matching data is what you expected.
What do the filter states mean?
A filter is in one of three states, and they behave very differently. Only the active state changes your data.
| State | What it does |
|---|---|
| Testing | Tags matching data so you can validate the filter. Does not remove data |
| Active | Applies the filter to incoming data and permanently changes it |
| Inactive | The filter is not evaluated |
Google says an active filter can take 24 to 36 hours to apply, and a property can have up to 10 data filters.
Why might my visits still appear?
Your visit may come from an address that is not in the list. The rule is address-based, so any visit from an unlisted address, such as a home connection or a mobile network, is counted.
Other causes are a filter still in testing state, a filter that has not finished applying, and a visit made before the filter was activated. Look at the list of addresses first, then the filter state.
Should I exclude other traffic too?
Excluding your own visits is separate from excluding unwanted referrals. Referral exclusions stop traffic from listed domains, such as a payment processor, from being reported as a referral.
Google lists a limit of 50 referral exclusions per data stream. Check both as part of a GA4 health check.
What sources does this guide use?
The primary sources are linked below, so each statement can be checked at its origin.
Frequently asked questions
Does the filter remove visits that were already recorded?
No. Google says data filters do not affect historical data. They apply to data collected after the filter is active.
How long does a filter take to apply?
Google says a filter can take 24 to 36 hours to start applying. Test it with a visit from a listed address and look again the next day, rather than expecting an instant result.
Why are my own visits still showing?
The rule is based on IP address, so a visit from an address that is not listed is not excluded. A filter that is still in testing state also tags data without removing it. Check the list of addresses and the filter state.
Can I undo an active filter?
Google says the effect of an active filter on the data is permanent, because excluded data is never processed. This is why Google provides a testing state. Check the filter in testing first, and activate it only when it behaves as you expect.