How to Filter Google Analytics
Your Google Analytics account holds a goldmine of data, but without filters, it's like trying to find a needle in a haystack full of confusing and misleading information. This article will show you exactly how to filter your data in Google Analytics 4, an essential first step for turning your data into true insights to improve your marketing efforts and grow your business.
Why You Absolutely Need to Filter Your Google Analytics Data
By default, GA4 collects data from everyone and everything that visits your site. This includes you, your team, developers, spam bots, and irrelevant traffic from countries you don't even do business with. Without filtering, this extra "noise" skews your metrics, making it impossible to rely on your data for making important business decisions.
Here’s why cleaning up your data is non-negotiable:
- For Data Accuracy: By excluding traffic from your own team, you get a more accurate picture of how real customers behave. If you and your employees visit your site hundreds of times a month, it can inflate your user counts and session data, leading you to believe your site is more popular than it actually is.
- For Focused Analysis: Filters allow you to zoom in on specific segments of your audience. You can isolate traffic from a single marketing campaign, compare the behavior of mobile users versus desktop users, or see which specific channels are driving the most revenue for your business.
- For Better Decision-Making: Clean, filtered data gives you the confidence to make smarter decisions about things that make your business money: everything from marketing budgets, to campaign strategy, and website design without relying on "gut feeling."
Understanding the Main Ways to Filter in GA4
Google Analytics 4 has several ways to filter data and a different approach than the classic Universal Analytics. Understanding the main two approaches will help you choose the right method for a specific purpose.
1. Data Filters: These are permanent filters you apply at the property level. They work by including or excluding certain event data before it gets processed into your reports. The most common use for these permanent filters is to keep your own internal employee traffic out of your official reports.
2. Report Filters: These are temporary filters you apply on-the-fly inside standard or custom Exploration reports. This method is non-destructive, meaning it doesn't permanently change your data. Instead, it lets you temporarily narrow down the data to analyze a specific segment, making it perfect for your everyday analysis as you explore different areas of interest related to your data.
Let’s start with setting up the most important permanent filter: excluding your internal traffic.
How to Exclude Internal Traffic with GA4 Data Filters
One of the first things you should do after setting up GA4 is to filter out traffic from yourself and your team. This is a multi-step process, but just follow along, and you’ll have clean data in no time.
Step 1: Find Your Public IP Address
First, GA4 needs a way to identify you. The easiest way to do that is by your location's public IP address. Simply go to Google and search "what is my IP address?" Google will display it at the very top of the search results.
If you have remote team members, ask them to do the same and send you their IP addresses if they are static IPs. Note: if your office or home has a "dynamic" IP address (one that changes regularly), you will have to update this periodically.
Step 2: Define Your Internal Traffic in GA4
Now that you have your list of IP addresses, it’s time to tell Google Analytics to recognize them.
- Log into your Google Analytics account and click the Admin gear icon in the bottom-left corner.
- In the Property column, click on Data Streams and select your website’s data stream.
- Scroll down and click on Configure tag settings.
- Click Show more, and then select Define internal traffic.
- Click the Create button.
- Name your rule something memorable, like "Office IP Address" or "My Home IP Address."
- Leave the
traffic_typevalue asinternal. This is the default and it works just fine. - Under IP address & > Match type, select IP address equals.
- Paste the IP address you found in Step 1 into the Value field.
- If you have several IP addresses to exclude, you can click "Add condition" for each one, or use the "IP address is in range" option if they fall within a specific CIDR range.
- When you’re done, click Create.
Now, GA4 knows how to identify traffic coming from your specified IP addresses. The next step is telling GA4 what to do with that identified traffic.
Step 3: Activate the Data Filter
- Navigate back to the main Admin screen.
- In the Property column, click on Data Settings > Data Filters.
- You might see an "Internal Traffic" filter that is set to
Testingmode. Click on the three vertical dots to the right and select Activate filter from the dropdown menu. - A confirmation box will appear, letting you know the change is permanent. Click Activate.
That’s it! From this point forward, GA4 will exclude any data tagged with the internal traffic type from all your standard reports. Keep in mind that filters don't apply retroactively - they only affect data moving forward.
Using Report Filters for On-the-Fly Analysis
While permanent data filters are for long-term cleanup, you’ll spend most of your analysis time using on-the-fly flexible report filters. This type of analysis is typically done through Exploration reports, or through creating comparisons within a standard existing report.
Building a Custom Report with Filters in the Explore Tab
The "Explore" section is a powerful way for building custom reports so you can find useful and deep insights that you can't find in the regular reporting interface. Let’s create a report that shows customer traffic source medium by landing page, but only for organic traffic using desktop computers as the device.
- In the left-hand navigation, click Explore and select Blank to start a new exploration.
- Click the plus sign (+) next to DIMENSIONS. Search for and import "Landing page + query string" and "Session source / medium." Also, feel free to add "Device category" to your Dimension as an option you can report on.
- Now click the plus sign (+) next to METRICS. Search for and import "Sessions" and "Engaged sessions." You could also add a metric like "Conversions".
- Drag Landing page + query string and Session source / medium from the Dimensions list to the Rows section below.
- Drag Sessions and Engaged sessions from the Metrics list to the Values section. You should now have an editable spreadsheet data report displayed in the main window of your browser.
- Now, locate the Filters box. Drag the Device category dimension from your dimensions list to the Filters area.
- A box will pop up. For the match type, select "exactly matches." Choose
desktopand click theApplybutton to save it. - To add a filter to show only "organic traffic," follow the same process. Drag the
Session source / mediumdimension to your filtering box. Selectmatches regexas the match type and enterorganicas your query value. ClickApplyagain to save your change.
Your custom report is now only showing sessions that originated from an organic traffic source and from a user with a desktop PC. By using this methodology, you can create a wide variety of custom reports that allow you to dig deeper into the data that is most meaningful for your organization. Here are just a few examples you could try yourself.
Common Filter Recipes You Can Use to Go Deeper on Data Analysis
The best reports are based on a good question. What question are you dying to answer about your business? Use these examples of common questions and filters as inspiration to help you start digging into your own data to get the answers you need.
- Which Marketing Channels Bring in Our Most Valuable Customers?
- Are Our Paid Advertising Campaigns Successfully Driving Transactions?
- How Is the Content on Our Blog Performing on Mobile Devices?
- Which Countries Are We Getting the Most Traffic From?
Final Thoughts
Mastering Google Analytics is all about transforming raw data into actionable insights that drive your business forward. Filters are a powerful tool in eliminating noise and focusing on what truly matters. By implementing permanent data filters, you can ensure cleaner data for accurate analysis, and by utilizing report filters, you can explore specific segments in depth without altering the underlying data. With a strategic approach to data segmentation and filtering, you'll be well-equipped to navigate the intricacies of GA4, consistently gaining valuable insights from every report you generate.
With every new update or feature released by Google Analytics, there's an opportunity to explore and make the most of it in GA4. That's where Graphed comes in. It's a tool designed to help you leverage the full power of GA4 and maximize your data strategies. Whether you’re executing manual analyses or automating insights across your organization, the platform ensures you're always steps ahead. With Graphed, data becomes more accessible, allowing everyone in your team to make informed decisions using insights drawn from Google Analytics.
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!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.