
Set utm_medium=ai_search on every link you control, and pair it with a lowercase, controlled utm_source token for each surface: chatgpt, perplexity, gemini, claude, copilot. That one medium becomes the join key that lets analytics show AI-agent referrals as their own channel. Because UTMs are the highest-confidence signal, tag first and treat everything else as a fallback.
TL;DR:
- Preserve the full query string through canonical redirects, proxies, CDN rules, and checkout hops; test each agent click through to its final landing URL.
- In GA4, place the exact ai_search medium rule above referrer rules, then default Referral and Organic Search; classify untagged host matches as medium confidence.
- When UTMs disappear, check referrers before user agent or server logs, and label inferred matches low confidence because crawler activity may not represent clicks.
- For ecommerce, verify first touch UTMs reach order records after redirects and checkout, then compare AI attributed visits with conversions to identify listing fixes.



