A GA4 expression for AI-assistant visits
Pick the assistants you want and get an expression ready for GA4's source condition. Test it with a source or URL, then copy it into a custom channel group or an exploration.
- The same list Rankawy uses
- Test before copying
- No connection to your Google account
Expression for the source condition
Use it with the Source dimension and the matches regex condition in a channel group, or with the Session source dimension in an exploration.
Source:chatgpt.com✓ Matches
We read the host name from a URL and match the source as you wrote it, because GA4 regular expressions are case sensitive by default.
Add it as a channel in GA4
- Open Admin, then Channel groups under Data display.
- Click Create new channel group to start from a copy of the default group, and name it.
- Click Add new channel, name the channel, then Add condition group.
- Choose the Source dimension and the matches regex condition, paste the expression, then click Save channel.
- Click Reorder, move the channel above Referral, then Apply.
- Click Save group.
Or use it in an exploration
- Create a new exploration in Explore and add the Session source dimension.
- Add a filter on Session source with the matches regex condition and paste the expression.
What does the generator do?
Subdomains
Matches each assistant's domain and any subdomain of it, with escaped dots.
utm_source names
Matches a bare source name such as chatgpt when the visitor arrives from a tagged link.
Full match
Does not match a lookalike such as chatgpt.com.evil.example.
Instant test
Paste a source or URL to see whether the expression matches it before you copy.