Key Takeaways
- ChatGPT automatically appends
utm_source=chatgpt.comto outbound links, but this is the only parameter -- you lose medium, campaign, and content data. - Use a consistent UTM naming convention:
utm_source=chatgpt,utm_medium=ai-referral,utm_campaign=[context]for all AI-related links you control. - You cannot add UTMs to links AI models generate dynamically, but you can use them in links on platforms AI models scrape (Reddit, Quora, forums) and in your llms.txt file.
- Combine UTM tracking with a custom GA4 channel grouping for "AI Search" to catch both UTM-tagged and untagged AI referral traffic.
- Proper AI traffic attribution reveals the 4.4x conversion rate advantage that AI referral traffic holds over organic search.
Is AI sending traffic you are not tracking? Check your AI visibility for free -- no signup required, results in 60 seconds.
Table of Contents
Why UTM Tracking Matters for AI Traffic
Without proper UTM tracking, AI referral traffic gets lost in your analytics. Visits from ChatGPT might show up as "referral," "direct," or "unassigned" depending on how the AI platform handles outbound links and how your GA4 is configured.
This matters because AI referral traffic converts at 4.4x the rate of organic search. If you cannot see it, you cannot measure it. If you cannot measure it, you cannot justify investing in AI SEO or optimize for it.
UTM parameters give you three layers of AI traffic intelligence:
- Source identification -- which AI platform sent the visitor (ChatGPT, Perplexity, Claude, Gemini, Copilot)
- Medium classification -- grouping all AI traffic together as "ai-referral" rather than mixing it with traditional referrals
- Campaign context -- understanding which content, topic, or promotion drove the AI mention
Combined with a custom GA4 channel grouping, this gives you a complete picture of your AI traffic funnel.
What AI Platforms Do Automatically
Before adding your own UTM parameters, understand what AI platforms already do:
| Platform | Automatic UTM Behavior | What You Get | What You Miss |
|---|---|---|---|
| ChatGPT | Appends utm_source=chatgpt.com | Source attribution | Medium, campaign, content |
| Perplexity | Passes referrer header (perplexity.ai) | GA4 detects as referral | All UTM parameters |
| Claude | Passes referrer header (claude.ai) | GA4 detects as referral | All UTM parameters |
| Gemini | Traffic may appear as Google referral | Partial source detection | AI vs organic Google distinction |
| Copilot | Passes referrer header (copilot.microsoft.com) | GA4 detects as referral | All UTM parameters |
The key gap: Most platforms only pass enough data for GA4 to identify the source. You lose the ability to segment by content type, campaign, or context. This is where your own UTM strategy fills in the gaps.
The Gemini challenge: Traffic from Google Gemini and AI Mode is particularly tricky because it originates from google.com. GA4 may classify it as organic Google traffic rather than AI referral. Look for the google.com/search referrer with AI-specific query parameters to distinguish these visits, or rely on Google Search Console's AI Overviews data.
Recommended UTM Naming Convention
Consistency is critical. Establish a naming convention before you start tagging and enforce it across your team.
The standard framework
?utm_source=[platform]&utm_medium=ai-referral&utm_campaign=[context]&utm_content=[detail]
Parameter values
utm_source -- Always lowercase, no spaces, identifying the AI platform:
chatgptperplexityclaudegeminicopilotai-general(for links placed where multiple AI platforms might scrape)
utm_medium -- Use ai-referral for all AI-related links. This groups all AI traffic under one medium, making it easy to create a channel grouping. Do not use referral (mixes with traditional referrals) or platform-specific mediums (fragments your data).
utm_campaign -- Describes the context or intent:
product-recommendation-- links in product-focused contenthow-to-guide-- links in educational contentbrand-mention-- links associated with brand awareness contentcompetitor-comparison-- links in comparison contentllms-txt-- links in your llms.txt file
utm_content (optional) -- Additional detail for A/B testing or content variants:
pricing-pagedemo-ctablog-post-title
Where You Can Add UTM Parameters
You cannot control links that AI models generate in real-time responses. But you can influence the URLs that AI models encounter during crawling and training:
1. Your llms.txt file
The llms.txt file tells AI models about your site. Links in this file can include UTM parameters:
# llms.txt for yoursite.com
> Main product page
https://yoursite.com/product?utm_source=ai-general&utm_medium=ai-referral&utm_campaign=llms-txt
2. Reddit and Quora posts
AI models heavily cite Reddit (21% of AI Overview citations) and Quora (14%). When you post helpful answers on these platforms and include links to your site, add UTM parameters:
https://yoursite.com/guide?utm_source=reddit&utm_medium=ai-referral&utm_campaign=community-answer
This tags traffic whether a user clicks directly or whether an AI model picks up the URL and includes it in a response.
3. Forum and community contributions
Stack Overflow, Product Hunt discussions, Hacker News comments, and niche forums are all indexed by AI models. Use UTMs on links you place in these contexts.
4. Digital PR and guest content
When your brand is mentioned in articles on third-party sites, request that links include AI-aware UTM parameters. Not all publishers will accommodate this, but those that do give you cleaner attribution.
5. Internal links on your own site
AI crawlers follow internal links. While this is less impactful for UTM tracking (you control your own site anyway), ensuring your sitemap and key navigation URLs are clean and consistent helps AI crawlers index the right pages.
UTM Templates for AI Sources
Copy-paste templates for common AI tracking scenarios:
Reddit answer with product mention
https://yoursite.com/product?utm_source=reddit&utm_medium=ai-referral&utm_campaign=community-answer&utm_content=product-name
Quora answer with guide link
https://yoursite.com/guide?utm_source=quora&utm_medium=ai-referral&utm_campaign=expert-answer&utm_content=guide-topic
llms.txt product page
https://yoursite.com/product?utm_source=ai-general&utm_medium=ai-referral&utm_campaign=llms-txt&utm_content=main-product
Guest post / digital PR
https://yoursite.com/page?utm_source=publication-name&utm_medium=ai-referral&utm_campaign=digital-pr&utm_content=article-title
YouTube description link
https://yoursite.com/page?utm_source=youtube&utm_medium=ai-referral&utm_campaign=video-title
Integrating UTMs with GA4 Channel Groupings
UTM parameters work best when paired with a custom GA4 channel grouping. Here is how they connect:
Step 1: Create the "AI Search" channel
In GA4, go to Admin > Data display > Channel groups > Create custom channel group. Create a channel called "AI Search" with these rules:
Rule set (catches both UTM-tagged and untagged AI traffic):
- Source matches regex:
chatgpt|perplexity|claude\.ai|gemini\.google|copilot\.microsoft - OR Medium exactly matches:
ai-referral
This catches:
- Untagged traffic from AI platforms (detected by referrer)
- UTM-tagged traffic from any source with
medium=ai-referral
Step 2: Verify in real-time reports
After setup, check GA4's real-time reports to confirm AI traffic is being classified correctly. Click through to your site from ChatGPT to verify the attribution.
Step 3: Build conversion comparison reports
Create an Exploration report comparing conversion rates across channels. This is where the 4.4x conversion advantage becomes visible in your own data.
For the complete GA4 setup process, including custom dimensions and automated alerts, see our GA4 AI referral traffic setup guide.
Common Mistakes to Avoid
1. Inconsistent naming
utm_source=ChatGPT and utm_source=chatgpt create two separate entries in GA4. Always use lowercase. Establish a naming document and share it with your team.
2. Using utm_medium=referral
If you tag AI links with medium=referral, they mix with traditional website referrals in GA4. Use medium=ai-referral to keep AI traffic separated.
3. Over-tagging internal links
Adding UTM parameters to internal links on your own site overwrites the original traffic source. If a user arrives from ChatGPT and then clicks an internal link with a different UTM, GA4 will attribute the session to the internal UTM instead. Only use UTMs on external-facing links.
4. Ignoring untagged traffic
Most AI referral traffic will arrive without your custom UTMs -- it comes from links that AI models generate dynamically. Your GA4 channel grouping must catch both UTM-tagged and untagged traffic (via referrer matching) to get the complete picture.
5. Forgetting to track conversions
UTM tracking without conversion events is just traffic counting. Ensure your GA4 has properly configured conversion events so you can measure the actual value of AI traffic, not just its volume.
Frequently Asked Questions
Does ChatGPT automatically add UTM parameters to links?
Yes. ChatGPT appends utm_source=chatgpt.com to outbound links. However, this only covers the source parameter -- you miss medium, campaign, and content data. Pair this with a custom GA4 channel grouping for complete attribution.
Can I add UTM parameters to links that AI models cite?
Not directly for dynamically generated links. But you can add UTMs to links on platforms AI models scrape (Reddit, Quora, forums), in your llms.txt file, and in content that AI crawlers index.
What UTM naming convention should I use for AI traffic?
Use lowercase, consistent values: utm_source=[platform], utm_medium=ai-referral, utm_campaign=[context]. The ai-referral medium groups all AI traffic under one classification in GA4.
How do I track AI traffic that arrives without UTM parameters?
Create a custom GA4 channel grouping that matches referral sources (chatgpt.com, perplexity.ai, claude.ai) in addition to your UTM-based rules. This catches both tagged and untagged AI traffic.
Should I use utm_medium=referral or utm_medium=ai-referral?
Use ai-referral for any links you control. This separates AI traffic from traditional referrals in your reports and enables cleaner channel groupings.
Is AI sending you traffic you cannot see?
Check your AI visibility in 60 seconds. Know which platforms mention you before setting up tracking.
Trusted by 2,400+ websites -- No credit card required