How to Track ChatGPT Referrals in Google Analytics 4
Seeing "(direct) / (none)" as a major traffic source in Google Analytics 4 can be frustrating, especially when you suspect much of that traffic is coming from valuable referrals. If you're using ChatGPT to showcase your links, you're likely facing this exact problem. This article will show you exactly how to track your ChatGPT referrals in GA4 so you can get the credit you deserve for that traffic.
Why Does ChatGPT Traffic Show Up as "Direct" in GA4?
First, let's quickly cover how Google Analytics usually identifies traffic sources. When a user clicks a link on one website (like a blog or social media site) to visit your website, their browser sends a piece of information called a "referrer" header. GA4 reads this header and says, "Aha! This visitor came from xyz.com," and correctly categorizes the session under a 'Referral' source.
However, traffic from sources like ChatGPT, mobile apps, and email clients often behaves differently. ChatGPT isn't a traditional website browser. When a user clicks a link you've provided in a chat, no referrer information is passed along. To Google Analytics, it looks like the user appeared out of thin air by typing your URL directly into their address bar. As a result, GA4 lumps this valuable, context-rich traffic into the generic and unhelpful "(direct) / (none)" bucket.
This means you can't measure the performance of your ChatGPT answers, custom GPTs, or API integrations. You can't see how many engaged users it sends, which links they click on, or if they complete key conversions on your site. Fortunately, there's a straightforward and universally accepted way to fix this - and all it takes is adding special tracking tags to your URLs.
The Solution: Adding UTM Parameters to Your URLs
UTM parameters are the gold standard for tracking marketing campaign performance across the web. They are simple tags you add to the end of a URL to tell analytics tools exactly where a visitor came from. When a user clicks a URL with UTM tags, GA4 reads them and uses that data to categorize the traffic instead of relying on a missing referrer header.
For tracking ChatGPT traffic, you need to focus on three main parameters:
utm_source: This identifies where the traffic came from. For our purposes, this will be something simple and clear like 'chatgpt'.
utm_medium: This describes the type of traffic. Think of it as the marketing channel. Common examples are 'cpc', 'social', 'email', and 'referral'. We will use 'referral' here as it fits best.
utm_campaign: This names the specific campaign or effort. It allows you to differentiate between different prompts, custom GPTs, or conversational strategies. You might use something like 'ai_assistant_customer_support' or 'winter_promo_gpt'.
When you combine these parameters with a standard URL, it looks something like this:
When someone clicks that link, GA4 will now know with certainty that the session came from your "ai_powered_content" campaign on ChatGPT. No more guessing, and no more valuable traffic disappearing into the "direct" traffic black hole.
How to Create Tagged URLs for Tracking ChatGPT
You don’t have to build these URLs by hand. Google provides a free and easy-to-use tool that does all the work for you.
Step 1: Go to Google's Campaign URL Builder
The easiest way to generate foolproof UTM-tagged URLs is with Google's GA4 Campaign URL Builder. This tool provides a simple form that ensures all your parameters are formatted perfectly.
Step 2: Fill Out the Form Fields
In the builder tool, you'll see several fields. You only need to fill in the essential ones for tracking ChatGPT traffic:
Website URL: Enter the full URL of the page you want to link to (e.g., 'https://www.yourwebsite.com/blog/my-latest-article').
Campaign source (utm_source): This is where you'll put 'chatgpt'. It's a best practice to keep this lowercase and consistent across all your links to avoid splitting your data in GA4.
Campaign medium (utm_medium): Use 'referral'. Using a standard term like this helps it align with GA4's Default Channel Groupings for cleaner reporting. You could also use something like 'ai', but 'referral' is more universally understood.
Campaign Name (utm_campaign): Be descriptive here. If you're building a custom GPT for customer support, you could use 'support_bot_gpt4'. If you're answering prompts about a specific service, use 'service_promo_chat'. This is what lets you compare the performance of different efforts. Give each logically different campaign a unique name.
As you fill out the fields, the builder will automatically generate the fully tagged URL at the bottom of the page. You can simply copy this URL and you're ready to go.
Step 3 (Optional): Use a URL Shortener
The generated links with UTM parameters can get pretty long, which can be an issue when you want them to appear cleaner or look less like a tracking link. For a cleaner look, you can use a free service like Bitly to create a shorter, more shareable version of your long UTM link. The shortened link will still contain all the original tracking data when someone clicks on it.
Where to Use Your Newly Tagged URLs
Now that you know how to create the links, the final step is to start using them strategically. You'll want to use them anytime you are referencing your own website links or assets within an AI Chat platform. A few great places to start are:
Custom GPTs & Assistants: If you are building a custom GPT that sources information from your own website, blog, or knowledge base, make sure every single link you provide in its instructions is tagged with UTMs. This is the most powerful way to measure the direct impact your custom GPT has on driving traffic and conversions.
During Manual Answers: Anytime you are manually using ChatGPT (or any AI tool) to provide information that links back to your site - whether sharing with a client, helping a customer, or answering a question in a public discussion - use your tagged URL.
Inside Your Content Pieces: For those pages, or parts of the business, that you know will likely be referenced or scraped by AI models in the future, you may even want to start adding UTM-tagged URLs either subtly (or directly) into your content. This proactive step helps pre-tag your traffic should an AI model scrape and repeat your link exactly.
Applications Built on the OpenAI API: If you're developing an application that leverages the OpenAI API to generate content or answers linking to your site, make sure your code programmatically constructs and includes these UTM parameters on any URLs it generates.
How to See ChatGPT Reporting in Google Analytics 4
Once you've implemented your tagged URLs and traffic has started coming through, you can easily find your data in GA4. Here's how to uncover insights from this new stream of referrals.
Step 1: Navigate to the Traffic Acquisition Report
In your GA4 property, go to Reports > Acquisition > Traffic acquisition. This report shows you where your website traffic comes from, grouped by session source and medium.
Step 2: Find Your ChatGPT Source / Medium
Now, just scan the report table for "chatgpt / referral," the source and medium you created with Google's URL Campaign Builder tool.
Step 3: Add "Session Campaign" as a Secondary Dimension
This is where your campaign name comes into play. To see how each unique ChatGPT prompt or Assistant is performing, just click the small '+' button in the header row of the report table, and select Session Acquisition > Session campaign from the options list.
With this complete, you can finally connect sessions, engaged users, and crucial conversion events directly back to the specific campaign name (utm_campaign) you set earlier. You've successfully closed the attribution loop and can confidently measure which of your AI answers and prompts are most effective at driving actual results.
Final Thoughts
By simply adding UTM parameters to your links, you can stop ChatGPT traffic from being mislabeled as "Direct" and finally get accurate credit for your AI-driven marketing and conversational support efforts in Google Analytics 4. It lets you prove which prompts are resonating, which custom GPTs are driving conversions, and where you should double down on your conversational strategy.
We built Graphed because we believe getting these kinds of clear insights from your data shouldn't require navigating complex reports or even remembering which specific parameter to add as a secondary dimension. After connecting GA4, you can skip the reporting interface and just ask plain English questions like, "How many users came from ChatGPT last month?" or "Create a bar chart comparing conversions from 'support-gpt-campaign' versus 'sales-promo-campaign'." We instantly build the report for you so you can spend less time searching for answers and more time acting on them.