Free tool

AI referral regex generator for GA4, Tag Manager and Looker Studio

Pick the AI assistants you want to track and copy a ready-made regex. It’s built from the same list of AI referrers Which AI Sent uses, kept up to date as new assistants appear.

1. Choose assistants

2. Choose where you’ll paste it

3. Copy


      
      
    

How to use it

GA4

Admin → Data display → Channel groups → Create new channel group → Add new channel. Condition: Source matches regex, paste, and move the channel above Referral. Full walkthrough: AI traffic in GA4.

Google Tag Manager

Create a Regex Table variable with input {{Page Referrer}}, add the pattern with output “AI”, and set a default of “Other”. Use it to label events or fire tags only for AI visitors. Or skip the work and add Which AI Sent as a tag.

Looker Studio

Add a calculated field to a GA4 data source and paste the generated CASE formula to get an “AI assistant” dimension.

What the regex can’t catch

A regex only sees visits that arrive with an AI referrer or source. It misses app visits whose referrer was dropped (they land in Direct), Google AI Overviews and AI Mode (they look like Google organic), and people who asked an AI and then searched your name or phoned. What each assistant sends · measuring the rest.

FAQ

Regex questions

Why are dots escaped with a backslash?

In regex, a plain dot matches any character. Escaping it (\.) matches a literal dot, so claude\.ai won’t match unrelated text.

Does GA4 need “matches regex” or “partially matches regex”?

For channel group conditions, “matches regex” works with this pattern because each alternative matches the whole source value. In report filters, use “matches regex”.

Is this list complete?

It covers the AI assistants that send meaningful traffic today. We add new ones as they appear, so check back or use Which AI Sent, which updates automatically.

See what AI is already sending you

Connect your website in one click, add one question to your form, and see AI leads and revenue with the evidence for each.