How to Exclude Country in Google Analytics

Cody Schneider9 min read

Getting noisy, irrelevant traffic from countries you don't serve can seriously clutter your Google Analytics data, making it hard to see what's actually working. Instead of letting low-quality traffic skew your metrics, you can filter it out for a clearer picture of your target audience's behavior. This guide will walk you through exactly how to exclude specific countries in both Google Analytics 4 and the older Universal Analytics (UA).

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Would You Want to Exclude a Country's Traffic?

Cleaning up your data isn't just a "nice-to-have" for data purists. It directly impacts your ability to make smart marketing decisions. When your reports are full of sessions from users you'll never sell to, it dilutes your real conversion rates, skews user engagement metrics, and makes it difficult to assess campaign performance accurately.

Here are a few common reasons to exclude certain countries from your analytics reports:

  • Focus on Your Actual Market: If your company only ships products or offers services to specific countries, like the US and Canada, then traffic from India, Brazil, or Germany isn't relevant to your business goals. Filtering it out helps you focus on the customers that matter.
  • Eliminate Spam and Bot Traffic: Unfortunately, a lot of spam and low-quality bot traffic originates from specific countries. While Google has its spam filters, sometimes you see a sudden, suspicious traffic spike from a country you have no connection to. Excluding it can be a quick way to clean up your reports.
  • Improve Data Accuracy: Irrelevant traffic throws off key metrics. Imagine your true conversion rate for your target market is 3%, but thousands of zero-value sessions from other countries bring the overall average down to 0.5%. That misleading data could cause you to kill a perfectly good campaign.
  • Reduce Reporting Clutter: Sometimes, you just want a cleaner view. Sifting through dozens of countries with one or two sessions each is tedious. Filtering lets you zoom in on the regions that drive your business forward.

A Quick Look Back: Excluding Countries in Universal Analytics (UA)

Since Google Analytics 4 has now officially replaced Universal Analytics, this method is primarily for analyzing historical data you may still have in a UA property. It was done using a "View Filter," which permanently altered the data coming into that specific view from the moment it was created.

Remember, filters in UA were destructive, once you applied an exclude filter, that data was gone from that view forever. It also did not apply retroactively to data you had already collected.

Here were the steps to create an exclusion filter in UA:

  1. Navigate to the Admin section by clicking the gear icon in the bottom-left.
  2. In the far-right column ("View"), click on Filters.
  3. Click the red + Add Filter button.
  4. Give your filter a descriptive name, like "Exclude: India Traffic."
  5. For Filter Type, choose Predefined.
  6. From the dropdowns, select Exclude > traffic from the country > that are equal to.
  7. From the final dropdown menu, select the country you wish to exclude.
  8. Click Save.

After creating this, any new traffic from the specified country would no longer be recorded in that reporting view.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

How to Exclude a Country in Google Analytics 4

GA4 handles data differently and offers more flexibility than UA did. There isn't just one way to filter out a country, you have several options depending on whether you need a quick look for a one-off report, a reusable segment for ongoing analysis, or a permanent filter for incoming data.

Let's walk through the most practical methods.

Method 1: Use 'Comparisons' for Quick, Temporary Filtering

This is the fastest way to get a clean view of your data without making any permanent changes. Comparisons allow you to add an on-the-fly filter to most standard reports, like your Traffic Acquisition or Engagement reports. This is perfect for when your boss asks, "Hey, how did our campaigns do last week, but without that weird traffic from Russia?"

This method is temporary and for viewing only. It doesn't permanently change your data, you'll have to reapply it if you navigate away and come back later.

How to set it up:

  1. Go to any standard report, such as Reports > Acquisition > Traffic acquisition.
  2. At the top of the report, click Add comparison (you'll see it next to "All Users").
  3. In the build condition panel that opens on the right, you'll need to define who to exclude.
  4. Search for and select the Dimension: Country.
  5. Set the Match Type to: does not exactly match.
  6. In the Value field, select the country (or countries) you want to exclude.
  7. Click Apply.

Your report will now show two columns: "All Users" and your newly filtered comparison view. You can click the "X" on the "All Users" comparison to remove it, leaving only the filtered data. Your reports will now only show data from users not in the country you excluded.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 2: Use Filters in 'Explorations' for Custom Reports

If you're building a more detailed, custom report in GA4's "Explore" section, filtering is built right into the tool. Explorations let you drill much deeper into your data than standard reports, and any filters you apply here are saved within that specific exploration for you to revisit later.

How to set it up:

  1. In the left-hand menu, navigate to Explore and create a new Exploration (e.g., Free-form).
  2. In the first column ("Variables"), add the dimensions and metrics you want to analyze, such as Session source / medium, Country, Sessions, and Conversions.
  3. At the bottom of the "Variables" column, you'll see a section called Segments. Instead, look below that for Filters in the next column ("Tab Settings").
  4. Drag the Country dimension from your Variables list over to the Filters box in the Tab Settings column.
  5. Select your matching logic: does not exactly match or is not one of.
  6. Select the country (or countries) to exclude and click Apply.

Now, this specific Exploration report you've built will permanently (within this report) exclude data from that location, allowing you to create a saved, custom dashboard that always focuses on your target markets.

Method 3: Create a 'Segment' for Reusable Filtering

This is the most powerful and efficient method for ongoing analysis. A segment is a reusable subset of your data that you can apply across different reports and explorations. For example, you can create a segment for "Target Audience Only" that excludes non-target countries. You build it once and use it everywhere.

How to create a country exclusion segment:

  1. Go into a standard report or an exploration and click Add comparison or navigate to the Segments section respectively.
  2. In the top right, click Create a new Segment.
  3. Start with a User segment. This will group together all activity from users who meet your criteria.
  4. Give your Segment a clear name, like "Users [excl. IN, RU]".
  5. Under "Include users when," click Add new condition.
  6. Search for and select the dimension Country.
  7. Add a condition filter and choose does not contain or does not exactly match.
  8. Select the country you wish to exclude from the value list. You can add multiple "AND" conditions here to exclude several countries within the same segment.
  9. In the top right, click Save and Apply.

You have now created a segment that you can apply anywhere comparisons or segments are used. This turns a repetitive filtering task into a two-click process for future analysis.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 4: Using GA4 Data Filters for Permanent Exclusion

This is the GA4 equivalent to the old UA View Filter. It permanently filters specific data out of your property from the moment it is activated forward. Use this method with extreme caution. Once data is excluded with an active filter, you cannot get it back.

GA4 gives you three states for a data filter: Testing, Active, and Inactive. It's always a best practice to run a filter in "Testing" mode for a few days to ensure it's working as you expect before fully activating it.

How to create a permanent data filter:

  1. Navigate to Admin.
  2. In the "Property" column, go to Data Settings > Data Filters.
  3. Click the Create Filter button in the top right.
  4. A common use is to define this as generic "Internal Traffic," but here you can create a custom one. Click on Developer Traffic since internal traffic rules are less flexible. But for this purpose, we want a different flow. Correction, there is currently no filter type for 'Geography'. To work around this with native filters, you would typically need to send location as a custom user parameter to filter by, but the PRIMARY method for permanent filtration remains to handle this upstream via Google Tag Manager or your server.
  5. A more standard and marketer-friendly approach to "permanent" filtering is to stick to segments. However, the most direct 'permanent' exclusion for a dimension like IP address is available under Admin > Data Streams > [Your Stream] > Configure tag settings > Show more > Define internal traffic. Here you could enter IP ranges, which often correspond to specific countries, to exclude as internal traffic.

Given the complexity and limitations of permanent geographic filters in the GA4 admin, for most users, Methods 1, 2, and 3 (Comparisons, Exploration Filters, and Segments) provide the best balance of flexibility and control for excluding country data without the risk of permanent data loss.

Final Thoughts

Filtering out traffic from specific countries is an essential step toward clearer, more actionable data in Google Analytics. Whether you need a quick, temporary view using comparisons, a reusable segment for frequent analysis, or a filtered custom report in Explorations, GA4 provides flexible tools to help you focus on the user data that truly matters to your business goals.

Manually creating advanced segments and custom reports in each of your marketing platforms just to get a clear answer can feel like a full-time job. At Graphed, we connect directly to your data sources like Google Analytics, so you can skip the complex setup. Instead of building filters and reports by hand, you just ask questions in plain English, like, "show me website sessions, users, and conversions from the United States last quarter," and instantly get the clean, focused report you need.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!