How to add a filter to your reports in Google Analytics 4

blogs by lorna google analytics Aug 15, 2025
 

By Lorna Walker

What are filters in GA4?

Filters in Google Analytics 4 are powerful tools that allow you to temporarily narrow down the data displayed in standard reports to show only specific subsets that meet your criteria. GA4 filters are applied on-demand to individual reports and don't permanently alter your data.

When you apply a filter to a GA4 report, you're asking the system to show you only the data that matches your specified conditions. For example, you might filter to see only mobile traffic, only organic search visits, or only traffic from a specific geographic region.

Key characteristics of GA4 filters:

  • Apply only to the current report view
  • Don't persist when you navigate to other reports
  • Can be combined with up to 5 conditions per filter
  • Available in most standard detail reports
  • Can be saved as part of custom report configurations
  • Support exact matches, partial matches, and regular expressions

Why use filters in GA4 reports?

Filters serve multiple analytical purposes and provide significant advantages for data analysis:

Focus on relevant data

Filters help you eliminate noise and concentrate on the data that matters most to your analysis. Rather than scrolling through hundreds of pages or sources, you can instantly see only the data relevant to your current question.

Create "view-like" functionality

Since GA4 doesn't have the view structure from Universal Analytics, filters provide a way to replicate much of that functionality. You can create focused data sets for different business needs without permanently altering your data collection.

Improve analysis efficiency

Common use cases for filters include:

  • Traffic source analysis: View only organic search traffic or paid campaign data
  • Device-specific insights: Analyse mobile, desktop, or tablet user behaviour separately
  • Geographic targeting: Focus on specific countries, regions, or cities
  • Content performance: Examine specific page types, directories, or sections
  • User segment analysis: Filter by user properties, demographics, or behaviour
  • Campaign evaluation: Isolate performance data for specific marketing campaigns

Quality assurance and testing

Filters are invaluable for:

  • Excluding internal traffic during analysis
  • Testing data collection implementation
  • Identifying data quality issues
  • Validating tracking configurations

Filters vs comparisons: when to use each

Understanding the difference between filters and comparisons helps you choose the right tool for your analysis:

When to use filters

  • Single data subset: When you want to see only one specific segment (e.g., just mobile users)
  • Focused analysis: When you need to concentrate on a particular subset without distractions
  • Data cleaning: When you want to exclude unwanted data temporarily
  • Quick investigation: When you need to drill down into specific data points

When to use comparisons

  • Side-by-side analysis: When you want to compare multiple segments simultaneously
  • Performance comparison: When you need to see how different groups perform relative to each other
  • Persistent analysis: When you want the segments to carry over between reports
  • Visual comparison: When you need colour-coded charts and tables
 

Combining filters and comparisons

You can use both features together for sophisticated analysis. For example, apply a filter to show only e-commerce data, then add comparisons to see how mobile vs desktop users perform within that filtered dataset.

How to access filters in GA4

Filters are available in most standard detail reports within the Reports section of GA4. Here's how to find and access them:

Reports that support filters

Filters are available in detail reports such as:

  • Engagement reports: Pages and screens, Events, Conversions
  • Acquisition reports: User acquisition, Traffic acquisition
  • Monetisation reports: Ecommerce purchases, Publisher ads revenue
  • Demographics reports: User demographics, Tech details
  • Custom detail reports: Reports you've created or customised

Reports that don't support filters

  • Overview reports (Reports snapshot, Acquisition overview, etc.)
  • Real-time reports
  • Explore section reports (use segments instead)
  • Some custom reports depending on configuration
 

Locating the filter option

Once in a compatible report:

  1. Look for the filter controls at the top of the report, usually near comparisons
  2. Find the "+ Add filter" button or link
  3. Some reports may show this as a filter icon or dropdown

Important note: If you don't see the filter option, ensure you're in a detail report rather than an overview report, and verify that your GA4 account has sufficient permissions.

Adding your first filter

Let's walk through creating a basic filter to see only mobile traffic in a Pages report.

Step-by-step process

  1. Navigate to a detail report
    • Go to Reports > Engagement > Pages and screens
  2. Click "Add filter"
    • Look for the "+ Add filter" button at the top of the report
    • Click to open the filter configuration sidebar
  3. Configure the filter condition
    • Dimension: Select "Device category" from the dropdown
    • Match type: Choose "exactly matches"
    • Value: Enter "mobile" (case-sensitive)
  4. Apply the filter
    • Click "Apply" to activate the filter
    • The report will refresh to show only mobile traffic data

Understanding the results

After applying the filter, you'll notice:

  • Data reduction: The report shows fewer total page views and users
  • Filter indicator: A filter tag appears at the top showing your active filter
  • Focused insights: All metrics now reflect only mobile user behaviour
  • Updated charts: Visualisations adjust to show the filtered data subset

Filter indicator and management

Once applied, your filter appears as a tag or label at the top of the report. You can:

  • Click the "X" to quickly remove the filter
  • Click on the filter tag to edit the conditions
  • Add additional filters if needed

Understanding match types

GA4 offers several match types for different filtering needs. Choosing the right match type is crucial for accurate results.

Available match types

  • Exactly matches: Precise, case-sensitive matching
  • Does not exactly match: Excludes exact matches
  • Contains: Partial matching within dimension values
  • Does not contain: Excludes partial matches
  • Starts with: Matches values beginning with your text
  • Ends with: Matches values ending with your text
  • Matches RegEx: Pattern matching using regular expressions
  • Does not match RegEx: Excludes regex pattern matches

Case sensitivity considerations

Important: All match types in GA4 are case-sensitive. This means:

  • "mobile" ≠ "Mobile" ≠ "MOBILE"
  • "Google" ≠ "google"
  • Page paths are case-sensitive: "/Blog" ≠ "/blog"
 

Choosing the right match type

Selection guidance:

  • Use "exactly matches" when you know the precise value and want no variations
  • Use "contains" when you want to capture variations or partial matches
  • Use "starts with" for filtering by URL path prefixes or category-based grouping
  • Use "ends with" for file types or URL suffixes
  • Use regex for complex pattern matching or multiple condition combinations

Creating exact match filters

Exact match filters provide precise control and are ideal when you know exactly what you're looking for.

Common exact match scenarios

Geographic filtering

Goal: View traffic from the United Kingdom only

  • Dimension: Country
  • Match type: exactly matches
  • Value: United Kingdom

Traffic source filtering

Goal: See only Google organic traffic

  • Dimension: Source / medium
  • Match type: exactly matches
  • Value: google / organic

Page-specific analysis

Goal: Analyse a specific landing page

  • Dimension: Page path and screen class
  • Match type: exactly matches
  • Value: /contact-us
 

Tips for exact matching

  • Check spelling carefully: Typos will result in no matches
  • Mind the case: Use the exact capitalisation as it appears in GA4
  • Use the search function: Type in the dimension value field to see available options
  • Test with contains first: If exact match returns no results, try contains to see available values

Multiple value exact matching

You can specify multiple exact values for the same dimension:

  • Values: United Kingdom, United States, Canada
  • Logic: Uses OR logic (shows traffic from UK OR US OR Canada)
  • Useful for: Multi-country analysis, multiple campaign comparison

Using partial match filters

Partial match filters offer flexibility when you want to capture variations or don't know exact values.

Contains filter examples

Blog content analysis

Goal: View all blog-related pages

  • Dimension: Page path and screen class
  • Match type: contains
  • Value: /blog

This captures: /blog/, /blog/article-name, /category/blog-posts, etc.

Campaign analysis

Goal: See all social media campaigns

  • Dimension: Campaign
  • Match type: contains
  • Value: social

This captures: social_campaign, facebook_social, social_2024, etc.

Product category filtering

Goal: Analyse all product pages

  • Dimension: Page path and screen class
  • Match type: contains
  • Value: /products
 

Starts with and ends with examples

Subdirectory analysis (starts with)

Goal: All pages in the help section

  • Dimension: Page path and screen class
  • Match type: starts with
  • Value: /help/

File type filtering (ends with)

Goal: PDF download tracking

  • Dimension: Page path and screen class
  • Match type: ends with
  • Value: .pdf

Exclusion filters

Use "does not contain" or "does not exactly match" to exclude unwanted data:

  • Exclude internal traffic: Hostname does not contain "staging"
  • Exclude test data: Campaign does not contain "test"
  • Exclude specific pages: Page path does not exactly match "/admin"

Advanced regex filters

Regular expressions (regex) provide powerful pattern matching capabilities for complex filtering scenarios. Note: Regex filters are case-sensitive and limited to 250 characters.

Basic regex patterns

Multiple exact matches

Goal: Match multiple specific pages

  • Pattern: ^/contact$|^/about$|^/services$
  • Explanation: Matches exactly "/contact" OR "/about" OR "/services"

Flexible URL matching

Goal: Match blog posts with date patterns

  • Pattern: /blog/\d{4}/\d{2}/
  • Explanation: Matches /blog/2024/01/, /blog/2023/12/, etc.

Campaign pattern matching

Goal: Match all social campaigns across platforms

  • Pattern: (facebook|twitter|linkedin|instagram)_\w+
  • Explanation: Matches facebook_campaign, twitter_ads, etc.
 

Useful regex components

  • ^ - Start of string
  • $ - End of string
  • . - Any character
  • \d - Any digit (0-9)
  • \w - Any word character (letters, digits, underscore)
  • + - One or more of the preceding character
  • * - Zero or more of the preceding character
  • | - OR operator
  • [] - Character class
  • () - Grouping

Common regex filter examples

Parameter exclusion

Goal: Exclude URLs with query parameters

  • Pattern: ^[^?]*$
  • Match type: matches RegEx

Mobile subdomain filtering

Goal: Match mobile subdomain variations

  • Pattern: ^(m\.|mobile\.)
  • Match type: matches RegEx

Category page filtering

Goal: Match category pages with numbers

  • Pattern: /category/[^/]+/\d+
  • Match type: matches RegEx

Testing regex patterns

Before implementing regex filters:

  • Test patterns in online regex testers (regex101.com, regexr.com)
  • Start with simple patterns and build complexity gradually
  • Use "contains" filters first to see available data
  • Remember that GA4 regex is case-sensitive

Working with multiple conditions

GA4 allows you to add up to 5 conditions per filter, with all conditions connected by AND logic.

Understanding AND logic

When you add multiple conditions, all conditions must be met for data to appear in the filtered results. This is different from the OR logic used for multiple values within a single condition.

Multiple condition examples

Targeted geographic and device analysis

Goal: Mobile users from the UK

  • Condition 1: Country exactly matches "United Kingdom"
  • Condition 2: Device category exactly matches "mobile"

Campaign performance analysis

Goal: Paid search traffic that converted

  • Condition 1: Source / medium exactly matches "google / cpc"
  • Condition 2: Event name exactly matches "purchase"

Content and user behaviour analysis

Goal: Blog readers who engaged significantly

  • Condition 1: Page path contains "/blog/"
  • Condition 2: Session duration contains "00:02" (sessions over 2 minutes)
  • Condition 3: Page views per session contains "2" (viewed multiple pages)
 

Adding multiple conditions

  1. Create your first condition as normal
  2. Click "+ Add new condition"
  3. Configure the additional condition
  4. Repeat up to 5 total conditions
  5. Click "Apply" to activate the filter

Strategic condition combinations

Quality traffic analysis

  • Source contains "google"
  • Session duration contains "00:01" (over 1 minute)
  • Event count per session contains "3" (3+ events)

E-commerce conversion filtering

  • Event name exactly matches "purchase"
  • Device category exactly matches "mobile"
  • Country exactly matches "United States"

Content engagement analysis

  • Page path starts with "/resources/"
  • Scroll depth contains "75" (75%+ scroll)
  • Time on page contains "00:03" (3+ minutes)

Optimising multiple conditions

  • Start broad, then narrow: Begin with one condition and add specificity
  • Check data availability: Ensure each condition has sufficient data
  • Use logical order: Put most restrictive conditions first
  • Test incrementally: Add conditions one at a time to verify results

Editing and removing filters

GA4 provides several ways to modify or remove filters once they're applied.

Quick filter management

  • Remove entirely: Click the "X" on the filter tag
  • Edit conditions: Click on the filter tag to reopen the configuration
  • Add more filters: Click "+ Add filter" to create additional filters

Editing existing filters

  1. Click on the active filter tag at the top of the report
  2. The filter configuration sidebar reopens
  3. Modify any condition settings:
    • Change dimension selection
    • Update match type
    • Edit values
    • Add or remove conditions
  4. Click "Apply" to update the filter
 

Managing multiple filters

When you have multiple filters active:

  • Each filter appears as a separate tag
  • All filters must be satisfied (AND logic between filters)
  • You can edit or remove individual filters independently
  • Removing one filter doesn't affect others

Clearing all filters

To start fresh:

  1. Click the "X" on each filter tag individually
  2. Or refresh the page to clear all temporary filters
  3. Or navigate away from the report and return

Remember: Filters in standard reports are temporary and don't persist when you navigate to other reports or refresh the page, unless you save them as part of a custom report.

Practical filter examples

Here are real-world scenarios where filters provide valuable insights:

Traffic source analysis

Organic search performance

Use case: Analyse organic search traffic quality

Filter setup:

  • Report: Traffic acquisition
  • Condition: Source / medium exactly matches "google / organic"

Insights gained: Organic traffic volume, engagement metrics, conversion rates

Social media campaign evaluation

Use case: Assess social media marketing performance

Filter setup:

  • Report: Traffic acquisition
  • Condition: Source contains "facebook"
  • Additional values: "twitter", "linkedin", "instagram"

Insights gained: Social platform comparison, engagement quality, conversion attribution

Content performance analysis

Blog content effectiveness

Use case: Evaluate blog section performance

Filter setup:

  • Report: Pages and screens
  • Condition: Page path contains "/blog/"

Insights gained: Top-performing blog posts, user engagement, time on page

Product category analysis

Use case: Compare product category performance

Filter setup:

  • Report: Pages and screens
  • Condition: Page path starts with "/products/electronics"

Insights gained: Category-specific user behaviour, conversion paths

Device and user behaviour analysis

Mobile user experience

Use case: Optimise mobile experience

Filter setup:

  • Report: Tech details
  • Condition 1: Device category exactly matches "mobile"
  • Condition 2: Country exactly matches "United Kingdom"

Insights gained: Mobile-specific metrics, device models, screen resolutions

High-engagement user analysis

Use case: Identify most engaged users

Filter setup:

  • Report: User acquisition
  • Condition 1: Session duration contains "00:05" (5+ minutes)
  • Condition 2: Page views per session contains "3" (3+ pages)

Insights gained: Quality traffic sources, user characteristics, conversion likelihood

E-commerce and conversion analysis

Purchase behaviour analysis

Use case: Understand purchase patterns

Filter setup:

  • Report: Events
  • Condition: Event name exactly matches "purchase"

Insights gained: Purchase frequency, seasonal patterns, user segments

Cart abandonment investigation

Use case: Analyse checkout process

Filter setup:

  • Report: Events
  • Condition: Event name exactly matches "add_to_cart"

Insights gained: Cart addition patterns, popular products, drop-off points

Geographic and demographic analysis

Regional performance comparison

Use case: Evaluate regional marketing efforts

Filter setup:

  • Report: User demographics
  • Condition: Country exactly matches "United States"
  • Additional analysis: Apply city-level filtering

Insights gained: Regional preferences, local market performance, demographic trends

Language preference analysis

Use case: Optimise content localisation

Filter setup:

  • Report: Tech details
  • Condition: Language contains "en-gb" (British English)

Insights gained: Language-specific user behaviour, content preferences

Saving filtered reports

While filters in standard reports are temporary, you can save filtered configurations as custom reports for permanent access.

Creating custom reports with filters

  1. Start with a standard report that supports customisation
  2. Apply your desired filters using the methods described above
  3. Click "Customise report" in the top-right corner
  4. Configure additional settings if needed (dimensions, metrics, charts)
  5. Click "Save" and choose "Save as new report"
  6. Name your report descriptively (e.g., "Mobile Traffic - UK Only")
  7. Add to a collection for easy access in the sidebar
 

Benefits of saved filtered reports

  • Permanent access: Filters persist every time you view the report
  • Team sharing: All property users can access saved reports
  • Consistent analysis: Standardised filtering across time periods
  • Efficiency: No need to recreate filters repeatedly

Managing custom filtered reports

Access and manage your saved reports through:

  • Reports > Library: View all custom reports
  • Collections: Organise reports into logical groups
  • Sidebar navigation: Quick access to frequently used reports
  • Edit options: Modify filters, dimensions, and metrics

Custom report examples

  • "Mobile Blog Performance": Pages report filtered for mobile + blog content
  • "UK E-commerce Traffic": Acquisition report filtered for UK + purchase events
  • "Social Media Conversions": Events report filtered for social sources + conversion events
  • "Product Page Analytics": Pages report filtered for product directory

Limitations and troubleshooting

Understanding GA4 filter limitations helps you work more effectively and troubleshoot common issues.

Key limitations

  • Report compatibility: Filters only work in detail reports, not overview reports
  • Dimension availability: Not all dimensions are available in all reports
  • Temporary nature: Filters don't persist between reports unless saved
  • Maximum conditions: Limited to 5 conditions per filter
  • Case sensitivity: All matching is case-sensitive
  • No OR logic between conditions: Multiple conditions use AND logic only

Common troubleshooting issues

No data appears after filtering

Possible causes and solutions:

  • Spelling errors: Check dimension values for typos
  • Case sensitivity: Verify exact capitalisation
  • Overly restrictive conditions: Remove conditions one by one to identify the issue
  • Date range issues: Ensure your date range contains the filtered data
  • Insufficient data: Check if the condition exists in your dataset

Dimension not available

If a dimension doesn't appear in the dropdown:

  • The dimension may not be compatible with the current report
  • Try a different report type that supports the dimension
  • Check if it's a custom dimension that needs configuration
  • Verify data collection includes the required dimension

Filter results seem incorrect

Verification steps:

  • Double-check match type selection
  • Test with "contains" instead of "exactly matches"
  • Remove additional conditions to isolate the issue
  • Compare results with unfiltered data
  • Check for data sampling in high-traffic properties
 

Performance considerations

  • Complex filters: Multiple conditions may slow report loading
  • Regex patterns: Complex regex can impact performance
  • Large datasets: Filters on high-traffic properties may trigger sampling
  • Real-time reports: Some filters may not work in real-time reports

Data sampling and thresholds

Be aware that:

  • GA4 may apply sampling to large datasets with complex filters
  • Data thresholding may hide some filtered results to protect user privacy
  • Small datasets may show (not set) values for some dimensions

Best practices

Maximise the effectiveness of your GA4 filters with these best practices:

Strategic filtering approach

  • Start with business questions: Define what you want to learn before creating filters
  • Use descriptive documentation: Note your filter logic for future reference
  • Test incrementally: Add conditions one at a time to verify results
  • Validate with unfiltered data: Ensure filtered results make sense in context
  • Save useful filters: Convert temporary filters to custom reports for reuse

Technical best practices

  • Use exact matches when possible: More precise and typically faster
  • Mind case sensitivity: Double-check capitalisation in all values
  • Leverage regex sparingly: Use only when simpler match types won't work
  • Test filter combinations: Verify that multiple conditions work as expected
  • Monitor performance: Watch for slow-loading reports with complex filters

Analytical workflow optimisation

  • Combine with comparisons: Use filters to focus data, then comparisons to compare segments
  • Export filtered data: Use filtered reports as basis for further analysis
  • Create filter templates: Develop standard filters for common analysis needs
  • Document findings: Note insights discovered through specific filter combinations

Data quality and accuracy

  • Verify data collection: Ensure tracking captures the dimensions you want to filter
  • Check for data gaps: Look for missing or (not set) values
  • Cross-reference results: Compare filtered data with other analytics tools
  • Account for data latency: Recent data may be incomplete

Collaboration and sharing

  • Create team-friendly reports: Save filtered reports with clear names
  • Document filter logic: Explain complex filters for team members
  • Standardise naming conventions: Use consistent naming for custom reports
  • Train stakeholders: Teach colleagues how to apply basic filters
 

Future-proofing your filters

  • Monitor GA4 updates: Stay informed about new filtering capabilities
  • Regular filter audits: Review and update saved filters quarterly
  • Adapt to data changes: Update filters when tracking implementation changes
  • Explore new dimensions: Test new filtering options as GA4 evolves

Integration with other GA4 features

  • Audience creation: Use filter insights to build targeted audiences
  • Goal tracking: Apply filters to conversion analysis
  • Attribution analysis: Combine filters with attribution reports
  • Explore integration: Move from filtered standard reports to detailed Explore analysis

Remember: Filters are most effective when they serve a specific analytical purpose. Focus on creating filters that help you answer important business questions and drive actionable insights.

About the author

Lorna has been working in digital marketing for more than 20 years now, both running campaigns for her  own businesses as well as working on behalf of clients. She particularly enjoys helping clients learn how to take control of different aspects of their digital marketing themselves, making the best use of the tools that are available to them and getting them out from under reliance on developers and agencies to do things for them, empowering them to do these things themselves.

Struggling to implement these strategies in your own business? You're not alone. Join our training webinars designed specifically for small and medium businesses ready to take their digital marketing to the next level. View our complete list of upcoming topics and training sessions.

Find out more