GA4 AI traffic builder Free, runs in your browser

Track ChatGPT traffic in GA4: where is your AI traffic hiding?

Spoiler: in Referral, Direct and Unassigned. Let's bring it home.

I am Abhinay Gupta, an eCommerce SEO consultant with 8+ years of experience. Pick your AI platforms and get the GA4 channel group regex, a Looker Studio formula, BigQuery SQL and a capture snippet that carries the AI source to the order. Then upload your GA4 export and see how much AI traffic you have, how it converts and where it is misfiled. Most guides give you a static regex. This builds the setup and audits your data.

12 AI platformsRegex, Looker, SQLExport analyzerNothing uploaded

Written by Abhinay Gupta, eCommerce SEO consultant. Last reviewed November 2026. Hire me for your store →

Quick answer

How do you track ChatGPT, Perplexity and Gemini traffic in GA4?

Create a custom channel group in GA4 under Admin, Data display, Channel groups. Add a channel called AI Traffic with the condition Source matches regex, and paste a pattern that lists the AI platforms' domains, such as chatgpt.com, perplexity.ai and gemini.google.com. Move it above Referral so GA4 applies it first, then select the group in your reports. This builder generates the pattern for the platforms you pick. Expect an undercount, because copy-pasted links and stripped referrers appear as Direct.

Step 1 Build

Build your AI traffic setup

Tick the platforms you want to count. The outputs below update as you go.

1. GA4 channel group regex
  1. Admin, Data display, Channel groups, Create new channel group.
  2. Add channel named AI Traffic. Condition: Source, matches regex. Paste the pattern.
  3. Drag AI Traffic above Referral. Save.
  4. In reports, choose the new group as the channel dimension.
2. Looker Studio formula

Create a calculated field. Rename the source field if yours differs.

3. BigQuery SQL (starting point)

Replace the project and dataset. Test on one day and compare with GA4.

4. Capture snippet (carry the source to the order)

Test on staging first. It stores the first AI referral for 30 days and pushes an ai_referral event.

Step 2 Audit, private

Audit your GA4 export

Export a table with Session source (or source / medium), sessions, key events and revenue as CSV. The file is read in your browser.

Drop your GA4 CSV here

Limits Read this before you report numbers

What GA4 can and cannot see

SituationWhere it shows upWhat to do
Click from chatgpt.com, perplexity.ai and similarReferral, or your AI channel after setupUse the regex group
Link with utm_source but no mediumSometimes UnassignedCheck Unassigned for AI sources
Copy-pasted link or app that strips the referrerDirectAdd a "How did you hear about us?" option that lists AI tools
Person sees your brand in an AI answer, then searchesOrganic or DirectWatch branded search and survey answers
Google AI Mode and AI Overviews clicksOrganic GoogleCannot be separated in GA4
Agent-completed purchasesMay create no pageviewsLog order source server-side

Method: platform domains were reviewed in November 2026 from public guides and tested patterns. Platforms change domains without notice, so review the regex quarterly. The export analyzer classifies by the same regex.

Comparison Why this builder

How this differs from typical GA4 AI traffic guides

QuestionTypical guideThis builder
RegexOne fixed pattern to copyBuilt from the platforms you choose, with your own domains
Where it worksGA4 onlyGA4, Looker Studio, BigQuery and a capture snippet
Your dataNot checkedUpload your export to see AI sessions, rate, revenue and misfiled rows
HonestyVariesStates what GA4 cannot see

This describes the general pattern of guides I reviewed in November 2026, not every guide.

Track ChatGPT traffic in GA4: what this builder sets up

This builder creates the GA4 setup to track ChatGPT traffic and other AI traffic in GA4: a channel group, a report filter and an exploration so you can see AI referrals next to organic search.

This is the quickest way to track AI traffic in GA4: set it up once, then compare ChatGPT traffic in GA4 against organic search.

Sources and further reading

1 sources

Public sources behind the claims on this page. Links open the original. Checked November 2026.

About the author
Abhinay Gupta, eCommerce SEO consultant

Abhinay Gupta, freelance eCommerce SEO consultant

I have worked in SEO for 8+ years, across eCommerce, technical SEO and AI search. I have led SEO teams at Appinventiv and Restroworks and now work hands-on with stores on Shopify, WooCommerce, BigCommerce, Magento and custom builds. I write only about work I have done, and I say so when something is unproven.

LinkedIn · Upwork · About · Editorial policy · Case studies · Book a call

Reviewed November 2026. How I research and review. Figures come from the sources named on the page, or from my own Search Console and Google Analytics data where stated.

GA4 AI traffic tracking FAQ

Why does AI traffic not show up as its own channel in GA4?

GA4's default channel groups were not built for AI assistants, so visits from chatgpt.com or perplexity.ai usually fall under Referral, and some land in Direct or Unassigned. A custom channel group with a source regex pulls them into one AI channel.

Where do I put the regex in GA4?

In Admin, under Data display, open Channel groups and create a new group. Add a channel named AI Traffic, set the condition to Source matches regex and paste the pattern. Then drag AI Traffic above Referral, because GA4 applies the rules from top to bottom. The exact menu names can change, so check them against the current GA4 interface.

Does a custom channel group change my past data?

In GA4, custom channel groups apply to historical data in reports, because they are applied when you view the data. They do not change the default channel group, so keep both.

Will this catch all AI traffic?

No. Only visits that pass a referrer or a UTM tag are visible. Copy-pasted links, apps that strip the referrer, and people who see your brand in an AI answer and then search for you later all show up as Direct or Organic. Treat the number as a floor.

Can I separate Google AI Mode and AI Overviews from normal organic traffic?

Not reliably in GA4. Those clicks arrive from Google, so they look like organic Google traffic. Search Console reporting and your own testing are the available signals.

Why is some ChatGPT traffic in Unassigned?

Reports describe ChatGPT links sometimes carrying a utm_source value without a medium, which can leave sessions unassigned. The builder's rule order and the export analyzer help you spot this. Check your own data, because platform behaviour changes.

Which AI platforms does the builder include?

ChatGPT, Perplexity, Gemini, Copilot, Claude, Meta AI, DeepSeek, Grok, Mistral, You.com, Phind and Poe. The list was reviewed in November 2026. Review your regex every quarter, because platforms change domains without notice.

Is the GA4 export I upload sent anywhere?

No. The analyzer reads the CSV in your browser. Nothing is uploaded.

What export should I upload?

In GA4, build a Free-form exploration or a Traffic acquisition report with Session source or Session source / medium, plus sessions, key events and revenue, then export as CSV. The analyzer finds the columns by name.

What is the capture snippet for?

It stores the first AI referral on a visitor's device and sends it to your data layer, so you can attach it to the order. That helps when the last click is no longer the AI visit. Test it on staging first.

How accurate is the BigQuery query?

It is a starting point. GA4 export fields differ by property and date, and referrer data can sit in different places. Run it on a small date range and compare it with the GA4 report before trusting it.

Can you set up AI attribution for my store?

Yes. I set up GA4, GTM and reporting for eCommerce stores. Use the contact button.

Taking new clients Freelance projects and retainers · I reply within 12 hours

Get your GA4 AI traffic tracking set up

I work with online stores as a freelance eCommerce SEO consultant. Book a 30-minute call, or send a short brief with your site and goal. You get a specific answer, not a sales script. See my eCommerce SEO services or why hire a freelance consultant.

BuilderBook a call