GA4 & GTM
Regex Tester
Stop guessing if your Google Tag Manager triggers are firing correctly. Instantly validate your regular expressions for page paths, event names, and internal IP filters.
Do not include the leading/trailing slashes (e.g., use pattern not /pattern/).
Results
3 MatchesQuick Templates
Why Regex Matters in Analytics
Regular Expressions (Regex) are the backbone of advanced web analytics configuration. Instead of creating twenty separate triggers in Google Tag Manager for individual blog posts, a single line of regex can match every URL in a subdirectory.
However, getting regex wrong is one of the most common causes of silent data loss. A misplaced pipe | or an unescaped dot . can cause triggers to misfire, double-count events, or break your GA4 reporting entirely.
Common GA4 Regex Patterns
^(login|signup|checkout)$Matches EXACTLY those three event names./blog/.*Matches any URL path starting with /blog/.^192\\.168\\.1\\..*Filters internal traffic (note the escaped dots).
Not Sure If Your Regex Worked?
Run our automated GA4 scanner. We'll check your data streams, events, and conversions for common setup errors and silent data loss.