Attributing AI Referral Traffic in GA4 and GTM: A Setup Guide
How to separate AI-referred sessions from the rest of your traffic, where GA4 alone falls short, and how Promptwatch visitor analytics fills the gap.
"Does AI search send us any traffic?" Almost every team asks, and most answer with a shrug or a number pulled from one GA4 report. The shrug is more honest. AI referral traffic is awkward to measure for a few ordinary reasons, and knowing them gets you to a number you can defend.
Why it is hard
- Referrers vary. Some AI products pass a clear referrer, some pass none, and some change behavior between app and browser.
- Copy-paste breaks the trail. A user reads an answer, then types your URL. That arrives as direct traffic.
- Citations are not clicks. Many answers cite you and send nothing.
- Default channel groups were not built for this. AI sources often fall into "Referral" or "Direct" without a label.
So expect undercounting. The goal is a consistent, labeled floor, not a perfect total.
Step 1: define the sources you care about
Make a list of referrer domains for the assistants your buyers use. Promptwatch's visitor analytics attribute AI-referred traffic from ChatGPT, Perplexity, Gemini, Claude, Copilot, DeepSeek, Kimi, Mistral and more. Use that spread as your checklist. Referrer domains change, so review the list quarterly.
Step 2: build the GA4 view
In GA4, create a custom channel group or an exploration that matches session source against your AI referrer list with a regex. Name it plainly: "AI assistants." Then add landing page, conversions and engagement time as columns.
What you get is a floor. Treat any session with a recognizable AI referrer as a sure one, and accept that the true number is higher.
Step 3: tag links you control
Where you can, add UTM parameters to links you place yourself, such as in profiles, bios and your own content shared in communities. This will not affect what AI products show on their own, but it keeps your own campaigns out of the AI bucket by mistake.
Step 4: use GTM carefully
Google Tag Manager is the place to deploy scripts without a developer ticket. Promptwatch provides a GTM template for visitor analytics, plus a lightweight script and a WordPress plugin as alternatives. Whichever path you choose, test in preview mode, confirm the tag fires on all page types, and check that consent settings are applied the way your legal team expects.
Step 5: compare the two sources
Run the GA4 AI-assistant view and the Promptwatch visitor analytics side by side for a month. They will not match. Differences point to real issues: a referrer you had not listed, a consent rule suppressing one script, or a page not tagged. Reconcile the gap before you present numbers.
Step 6: connect traffic to the page
Sessions by landing page tell you which cited pages earn clicks. Cross-check with citation data. In Promptwatch, the Page Tracker joins crawls, citations and AI clicks per URL, and 360 Insights joins crawler logs, citation clicks and AI-referred visits per page. A page that is cited often and never clicked has a snippet or intent problem. A page that gets clicks from few citations is a candidate for more coverage.
Step 7: report conversions with care
AI-referred visitors may convert differently from other channels. Promptwatch's own case studies mention Crisp's AI-referred traffic converting at twice the rate of traditional channels and TreeHouse reporting AI search at around a quarter of organic conversions. Those are those companies' results, not a general rule, and your site may look different. Measure yours.
When you report, state the method: which sources count, which date range, and what you cannot see. A footnote on undercounting protects you from the first skeptical question.
What GA4 alone cannot show
GA4 sees visits. It does not see the crawl that preceded the citation, the prompt that triggered it, or the citations that never produced a click. For that you need prompt tracking and crawler data. The chain runs: bot fetches page, model cites page, user clicks, session converts. A single tool that records each link in the chain saves you from arguing about which link broke.
A monthly rhythm
- Update the AI referrer list.
- Compare GA4 against visitor analytics.
- List the five pages that got the most AI-referred sessions.
- List the five most-cited pages that got none.
- Choose one page from each list to improve.
Common mistakes
- Reporting a floor as the total. Say "at least."
- Counting bots as visitors. Crawler logs and visitor analytics are separate datasets for a reason. Do not merge them.
- Ignoring consent. Numbers differ between regions and banners.
- Over-reading small samples. Low-traffic sites will see noisy weeks.
Recommendation
Keep GA4 for your overall traffic story, and add a tool that was built to attribute AI-referred sessions and tie them to citations. Promptwatch does this with visitor analytics and 360 Insights, installed through a script, a GTM template or the WordPress plugin. It also lets you pair conversions with specific cited pages, which is the part GA4 cannot do by itself. Install it for a month, compare it with your GA4 view, and use the difference to decide how much to trust each.