How to Use New Match Types in Google Analytics 4
Wading through your Google Analytics 4 data can often feel like searching for a needle in a haystack. You know the answers you need are in there, but isolating specific campaign traffic or user segments is a constant challenge. This is where mastering GA4’s filter match types becomes a game-changer, transforming your high-level reports into sharp, actionable insights. This guide will walk you through exactly what each match type does and how to apply them to get clear answers from your data.
First, Where Do You Use Match Types in GA4?
Before we break down each match type, it's important to know where you will encounter them. In Google Analytics 4, you'll mainly use these filtering rules in two key areas:
- Comparisons: Found at the top of most standard reports (like Traffic Acquisition or Engagement), comparisons let you quickly slice up your data on the fly. You can create temporary audience segments to see how different groups behave side-by-side. These are perfect for quick questions and initial explorations.
- Explore Reports: Available in the "Explore" section, this is where you build custom, in-depth reports and funnels. Filters here are more permanent parts of your report's structure. If you find yourself applying the same comparison regularly, it’s a good sign you should build it out as an Explore report.
In both places, the process is similar: you choose a dimension (like Session campaign, Page path, or Country), select a match type, and then enter the value you want to filter by. Understanding how each match type works is the key to unlocking their full power.
A Breakdown of Every GA4 Match Type
GA4 provides a range of match types, from a simple "contains" text to the more complex regex. Let's walk through each one with practical examples for marketers and business owners.
1. contains
This is the most flexible and commonly used match type. It returns results if your specified text string appears anywhere within the dimension's value. It is not case-sensitive.
- Use this when: You want to group together items with a common keyword or identifier, even if the full text varies.
- Example: An e-commerce brand runs several campaigns for their summer sale with different platforms like
Facebookads-summer_sale-07 T1andGoogleads-summer_sale-07 T2. Instead of creating a filter for each, you can simply use a filter whereSession campaigncontainssummer_sale. This will pull in data from all related campaigns at once.
2. does not contain
As the name suggests, this is the exact opposite of "contains." It excludes any data where the dimension's value includes your specified text string. It is also not case-sensitive.
- Use this when: You need to remove noise from your reports, such as brand SERP traffic, internal tests, or irrelevant subdomains.
- Example: You want to analyze campaign performance, but your team sometimes uses "test" in campaign names for internal trials. To get a clean view, you can create a comparison and set a condition where
Session campaigndoes not containtest.
3. exactly matches
This match type is for precision. It only returns results where the dimension's value is an identical match to the text you provide. Unlike "contains," this match type is case-sensitive, so Video will not match video.
- Use this when: You need to isolate a very specific page, traffic source, or event without accidentally including others.
- Example: You want to see how many people triggered the
generate_leadevent. UsingEvent nameexactly matchesgenerate_leadensures you aren’t accidentally including data from an event you might have created called_generate_lead_testorgenerate_lead_form_b.
4. does not exactly match
This inverts the "exactly matches" condition, excluding only the values that are an identical, case-sensitive match to your input.
- Use this when: You want to exclude a single, specific item from a broader category.
- Example: You're analyzing marketing landing page performance but your homepage (
/) is skewing the data. In an Explore report, you can add a filter wherePage path and screen classdoes not exactly match/. This removes the homepage from your report, allowing you to focus on dedicated landing page performance.
5. starts with
This filter looks for values that begin with the exact text string you specify. It's case-sensitive and fantastic for grouping content or campaigns with a consistent naming convention.
- Use this when: You're organizing information into logical directories or categories.
- Example: All your blog posts live under the slug
/blog/, like/blog/5-marketing-tipsand/blog/intro-to-ga4. To analyze traffic across your entire blog, you can set a filter wherePage path and screen classstarts with/blog/. This is cleaner and more reliable than using acontainsfilter for "blog," which might accidentally include pages like/about-our-blog-philosophy.
6. does not start with
The inverse of "starts with," this excludes all values that begin with your specified string. It is also case-sensitive.
- Use this when: You want to remove a specific prefix-organized group from your dataset.
- Example: Maybe you have a separate international site under
/es/for Spanish content and/fr/for French. To see traffic just for your main English site, you could set two filter conditions:Page path and screen classdoes not start with/es/ANDPage path and screen classdoes not start with/fr/.
7. ends with
This returns results where the dimension value ends with the exact text string you provide. It's case-sensitive.
- Use this when: Your naming convention puts identifiers at the end, such as file types or specific tracking parameters.
- Example: Let's say you're tracking file downloads and your whitepaper PDFs always end with
-whitepaper.pdf. You could filter forFile nameends with-whitepaper.pdfto see engagement with just those assets.
8. does not end with
This excludes all values that conclude with the specified text string. It is case-sensitive.
- Use this when: You need to remove a specific suffix-based group from your data.
- Example: You want to analyze all page views except for those with anchor links (like
yoursite.com/pricing#enterprise). You could apply a filter wherePage locationdoes not contain#to simplify your goal of removing URLs with this pattern.Does not end withis harder to apply since the anchor text changes. However, if you wanted to exclude a specific parameter, like removing a developer's test state, you could filterPage locationdoes not end with?dev=true.
9. matches regex
Now we get to the advanced option. "Regex" stands for "Regular Expression," which is a special sequence of characters for defining a complex search pattern. Think of it as a super-powered "find and replace." It lets you do things you can't with the other match types, like specify multiple conditions at once with an "OR."
While an entire field of study, a simple regex keyword to know is the pipe |, which means "OR." So, the expression facebook|instagram would match a value if it contains "facebook" or "instagram."
- Use this when: You need to look for multiple exact matches at once, or when your condition is too complex for simpler match types.
- Example: A SaaS company wants to see traffic coming specifically from major paid social channels. They can create a filter where
Session source / mediummatches regexfacebook / cpc|linkedin / cpc|twitter / cpc. This report will only show sessions that match one of those three exact source/medium combinations.
10. does not match regex
This leverages the power of regular expressions to exclude multiple, complex patterns simultaneously.
- Use this when: You need to filter out several distinct groups that don't share a simple common keyword.
- Example: You are analyzing traffic a week after a product launch campaign on Google, Bing, and LinkedIn. You want to see all traffic except for those specific launch campaigns. You can apply a filter where
Session campaigndoes not match regexgoogle_launch|bing_launch|linkedin_launch.
How to Combine Match Types for Deeper Insights
The true power of these filters comes from combining them to create highly specific views. Let's walk through a real-world scenario to see how it works.
The Goal: A marketing manager wants to know how their "Spring_Sale_2024" campaign performed for users in the United States and Canada, but wants to exclude sessions from employees who might be testing the site using UTMs that include the word "test."
Here's how to build this view using "Comparisons" in the Traffic Acquisition report:
- Add a New Comparison: Navigate to Reports > Acquisition > Traffic Acquisition. At the top of the report, click + Add comparison.
- Isolate the Core Campaign:
- Exclude Test Traffic:
- Filter by Countries Using Regex:
- Apply the Comparison: Click Apply. GA4 will now regenerate the report, showing you data that meets all three of those conditions side-by-side with your "All Users" data. You've successfully built a pointed, actionable view in just a minute.
Final Thoughts
Moving from broad overviews to sharp analysis in GA4 hinges on your ability to filter precisely. Learning to use match types - from the simple "contains" to the powerful "matches regex" - gives you the vocabulary to ask very specific questions and get clear answers back, helping you find which efforts are truly driving growth.
Although these built-in tools are powerful, building complex reports in GA4 often means clicking through menus, adding conditions one by one, and remembering the exact dimensions you need. With Graphed, we streamline this entire process. You can connect your GA4 account in seconds and just ask a question in plain English, like, "Show me traffic and conversions from our Spring Sale 2024 campaign in the US and Canada, but exclude any test campaigns." We instantly generate a live dashboard to answer your question, skipping the manual setup and letting you get straight to the insights.
Related Articles
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.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.