Skip to main content

Overview

Filters allow you to narrow down your query results by specifying conditions that events must meet. You can filter on event properties, metadata, and use various comparison operators to match your exact needs.

Filter Structure

All filters follow this structure:

Filter Fields

Property Paths

Event Properties

Access custom properties you included when tracking events:

Event Metadata

Filter on built-in event fields:

Nested Properties

Access nested object properties:

Comparison Operators

Equality Operators

EQUALS

Exact match:

NOT_EQUALS

Not equal to:

Numeric Operators

GREATER_THAN

Greater than (for numbers):

LESS_THAN

Less than (for numbers):

GREATER_THAN_OR_EQUALS

Greater than or equal to:

LESS_THAN_OR_EQUALS

Less than or equal to:

String Operators

CONTAINS

String contains substring:

NOT_CONTAINS

String does not contain substring:

List Operators

IN

Value is in a list:

NOT_IN

Value is not in a list:

Complex Filter Examples

Multiple Filters

Combine multiple filters with AND logic:

User Segmentation

Filter by user properties:

Geographic Filtering

Filter by location:

Time-based Filtering

Filter by time ranges:

A/B Testing

Filter by experiment variants:

Data Type Handling

String Values

Numeric Values

Boolean Values

Array Values

Null Values

Common Filter Patterns

E-commerce Filters

User Engagement Filters

Error Tracking Filters

Feature Usage Filters

Performance Tips

1. Use Specific Property Paths

Be specific with your property paths to avoid ambiguity:

2. Use Date Ranges

Always include date ranges to limit the data scanned:

3. Order Filters by Selectivity

Put the most selective filters first:

4. Use IN Instead of Multiple EQUALS

When filtering for multiple values, use IN instead of multiple EQUALS filters:

Error Handling

Invalid Property Paths

Invalid Comparison Operators

Type Mismatches

Handle Filter Errors

Testing Filters

Validate Filter Syntax

Test Filter Results

Next Steps

Query Events

Learn how to query events with filters

Count Events

Get event counts for aggregations

List Events

Discover available event types

Custom Dashboard

Build a custom analytics dashboard