How Filters Work
On most platforms, Detrics fetches your data first and then removes the rows that don’t match your filters. Because the filtering happens on the Detrics side, the rules below apply consistently regardless of the data source. Some platforms have a native filtering module, and Detrics is connected to it: on Google Ads, Google Analytics 4, Meta Ads, and Shopify, your filters are translated into the platform’s own filtering language and applied at the source whenever possible. The results are the same; the query is just faster because the platform sends only the matching rows. Native translation is used only when your filters map cleanly to what the platform supports. In particular, filter chains that mix AND and OR are always evaluated by Detrics itself, so the combining rules described below hold on every platform. There are two kinds of filters:- Dimension filters compare text values (campaign name, country, device)
- Metric filters compare numbers (spend, impressions, conversions)
Dimension Filter Operators
About Regex Contains
Despite the name, Regex Contains does not accept full regular expression syntax. It accepts a list of plain texts separated by|, and keeps a row when the value contains any of them. Spaces around each text are ignored, and you can optionally wrap the whole list in parentheses: (sale|promo) works the same as sale|promo.
On the platforms that use this fallback, regex syntax such as ^, $, .*, or character classes is treated as literal text, so ^Brand.* looks for a value that literally contains “^Brand.*”.
Regex Contains Exact uses the same | list, but the value must match one of the texts entirely instead of just containing it. Regex Not Contains Exact is the inverse: it removes rows that exactly match any text in the list.
Google Ads and Google Analytics 4 are the exception. On these two platforms the regex operators are applied natively at the source and accept full regular expression syntax (RE2, the same engine Google’s own APIs use), matching case-insensitively. Metacharacters like
^, $, ., *, +, ?, \d, [...], {n,m}, and | all work. On every other platform the operators fall back to the plain | list described above, so if you need a filter to behave identically everywhere, stick to that list.Full Regex on GA4 and Google Ads
On GA4 and Google Ads you can write real regular expressions. The one thing to keep straight is partial vs. exact matching, because it decides whether you need to wrap the pattern in.*:
- Regex Contains matches the pattern anywhere in the value.
^Brand_keeps values that start with “Brand_”;\d{4}keeps any value that contains four consecutive digits. - Regex Contains Exact and Regex Not Contains Exact require the whole value to match. To match “contains X” here, add
.*on both sides:.*X.*.
_BND, or that are a 9-to-21-digit ID:
- Operator: Regex Not Contains Exact
- Value:
.*_BND.*|\d{9,21}
.* around _BND is required because this operator matches the entire value, and \d{9,21} matches an all-numeric name between 9 and 21 characters long. The two alternatives are joined with |.
Metric Filter Operators
Metric values are compared as numbers. A row with an empty metric counts as
0, so Greater Than 0 is a handy way to remove empty rows.
Combining Filters
You can chain several filters with AND / OR:- AND: the row must pass both conditions
- OR: the row must pass at least one
Filtering on Fields Not in Your Query
As a general rule, a filter references a field that is part of the query: if you filter onCampaign Name, Campaign Name should be one of your selected dimensions.
Three platforms also support dimensionless filtering, where you can filter on a dimension without selecting it:
- Google Analytics 4
- Meta Ads
- Shopify
Empty Values
- An empty or missing dimension is treated as empty text (
"") - An empty or missing metric is treated as
0 - Boolean dimensions (true/false fields) are the one case-insensitive exception:
true,True, andTRUEall match