8 min
November 14, 2025
How to Track Traffic from AI Overviews in Google Analytics 4 – Implementation Guide
The era of classic search is drawing to a close. With the growing popularity of LLMs like Chat GPT and the integration of generative Artificial Intelligence (AI) into Google results (the AI Overviews feature), the way users interact with our website is significantly changing.

Listen to the audio version of this article.
There are two challenges for analysts
Identifying AI Referrals (Referring Traffic): Separating traffic originating from LLMs (in the form of referrals) from standard referring traffic. This topic is widely discussed, but we include it in our instructions to provide a comprehensive solution.
Identifying AI Overviews Traffic: Understanding what portion of the traffic previously labeled as Organic Search actually comes from AI Overviews. This is the first guide where you will find instructions on how to measure this precisely.
What sets this Guide apart from others? Our Know-How:
Most guides available online focus on identifying AI traffic from referrals (e.g., ChatGPT, Claude, Perplexity). This provides an incomplete picture.
We provide a complete solution that combines two key pillars of AI traffic identification, ensuring full and reliable insight into your visibility in the new search era:
Pillar I: Pure Chatbot Traffic (AI Referral Identification): We catch and group traffic from tools that refer as classic referrals (the first pillar), relieving your Referral channel and ensuring clean data.
Pillar II: Revealing Hidden Sessions (AI Overviews Tracking): We catch clicks directly from Google results that previously masked themselves as organic traffic. You gain full control over the largest, previously invisible, portion of AI traffic.
Your Advantage: Precision and User Intent
The unique value of this Guide lies in integrating these methods through a modular modification of data in Google Tag Manager (GTM):
Modification of utm_medium (Our Know-How): This is the key element: at the Tag Manager level, we modify the medium attribute for hits coming from AI Overviews, overriding it to the unique value "ai-overviews". This allows us to create a consistent AI Search channel group in GA4 that works more precisely than standard grouping.
Insight into Intent (Optional, but Crucial for SEO): We append the attributes snippet_text_start and snippet_text_end to every click from AI Referrals. This allows you to see exactly what the user was looking for, providing invaluable insight into query intent.
Below, we present our proprietary solution that will allow you to identify this traffic and, most importantly, determine which exact fragment of your text was used by the AI.
Before You Start – Quick FAQ
Is the Beecommerce method stable?
The method for tracking AI Overviews that you are about to implement is effective, but it relies on unofficial modifications (Text Fragments is not a W3C standard).
IMPORTANT! Be aware that our solution is sensitive to changes and updates in Google's policy and may stop working in the future. Treat this as a temporary but strategic market advantage.
Implementing this solution is immediate access to data that is the foundation of your future SEO decisions. Although it is an ad hoc solution, the strategic advantage and analytical insight you gain today are unattainable for the competition.
When will you see the data?
After implementing the configuration in Google Tag Manager and Google Analytics 4, the system needs time to process the new data:
Delay: You must wait 24–48 hours for the new dimensions and parameters to be visible in the reports (although some operations in GA4 may take up to 72 hours). Do not check data correctness immediately after implementation; it simply makes no sense.
No Historical Data: Data collection starts from the moment the changes are published. You will not see past data. It's not magic.
1. Implementation in Google Tag Manager (GTM)
The fastest way to implement this is by importing a JSON container prepared by us, which contains all the necessary variables (to capture text fragments) and tags.

Step 1: Import the GTM Container
Download the prepared JSON file (ai overview tracking - GTM template by beecommerce.pl.json).
Log in to Google Tag Manager and go to the Admin section.
Select Import Container.
4. Select the downloaded JSON file and set the import method to Merge.
5. Choose the option Overwrite conflicting tags, triggers and variables.
6. Click Add to workspace.


Step 2: GA4 Tag Configuration
You need to attach the imported variables to your main GA4 configuration tag so that all events automatically include information about AI Overviews.
Open your existing GA4 Config Tag (GA4 Configuration Tag).
Expand the Shared Event settings section. If you have already configured this variable, proceed to point 5 of the instructions.
From the Event settings variable list, select New Variable... (New Variable).
4. Name the new variable "GA4 | Var | Event Settings | Common Event Settings".
5. Add the following three parameters:
Event parameter: medium | Value: {{Google Snippet Tracking | Var | JS | Replacement Medium}}
Event parameter: snippet_text_start | Value: {{Google Snippet Tracking | Var | JS | Snippet Start}}
Event parameter: snippet_text_end | Value: {{Google Snippet Tracking | Var | JS | Snippet End}}
Hint: Start typing {{ in the Value field to use the variable search function and avoid typos.
6. Save the variable, and then save the GA4 configuration tag.

Step 3: Publication
Save all changes in GTM.
Publish the container.
2. Configuration in Google Analytics 4 (GA4)
Now is the time to fully utilize the data you collected in GTM. You need to prepare GA4 to clearly receive and categorize this new information, transforming raw parameters into business reports ready for analysis.
Step 4: Creating Custom Dimensions
These dimensions will allow you to analyze which text fragment from your page was used by the LLM and generated traffic in the case of AI Referrals.
Log in to GA4 and go to Admin > Data display > Custom definitions.
Click Create custom dimension.


3. Create two dimensions with Event scope:
Dimension 1:
Dimension name: Snippet Start
Event parameter: snippet_text_start (Enter the name manually if it's not on the list).
Dimension 2:
Dimension name: Snippet End
Event parameter: snippet_text_end (Enter the name manually).
4. Save the changes.
Step 5: Creating a Custom Channel (AI Search)
This action will allow you to separate traffic from AI tools. We will put it into one group and call it AI Search.
What can you expect?
Referrals will decrease by 20-80%, depending on the traffic structure.
Organic search will decrease by 40-60% in favor of a large increase in the AI Search channel traffic.
This rule catches two traffic patterns:
Classic referrals from AI tools, via RegEx on the Referrer attribute.
Overridden Medium ("ai-overviews") – our know-how.
How to create a new traffic channel in GA4?
In GA4, in the Admin section, go to Channel groups and click Create new channel group.


2. Name this channel grouping "Default channel group with AI Search".
3. Set the new Channel Grouping as Default.
4. In the newly created group, by clicking on the group name, add a new channel named "AI Search".
5. Set the channel conditions by clicking on "+ Add condition group": Match at LEAST ONE rule in this group.

6. Add a rule: Source | matches regex | Paste this RegEx:
^(?:chatgpt\.com|chat-gpt\.org|claude\.ai|quillbot\.com|openai\.com|blackbox\.ai|perplexity(?:\.ai)?|copy\.ai|jasper\.ai|copilot\.microsoft\.com|gemini\.google\.com|(?:\w+\.)?mistral\.ai|deepseek\.com|edgepilot|edgeservices|nimble\.ai|iask\.ai|aitastic\.app|bnngpt\.com|writesonic\.com|exa\.ai|waldo|cohere\.ai|huggingface\.co|anthropic\.com|chatglm\.cn|baichuan-ai\.com|zhipu\.ai|palm-ai\.google\.com|gemini-api\.google\.com|xiaoice\.com|quora\.com/poe|my-ai\.snapchat\.com|deepl\.com|you\.com|yiyan\.baidu\.com|ai\.baidu\.com|anthropic-api\.com|open-assistant\.io|huggingchat\.com|forefront\.ai|character\.ai|chat\.suno\.com|deepmind\.com|phind\.com|pi\.ai|komo\.ai|vicuna\.ai|firefly\.adobe\.com|grok\.x\.com|coze\.com|x\.ai|bard\.google\.com|lighton\.ai|spellbook\.rossintelligence\.com|notion\.so/ai|wordtune\.com|syntesia\.io|hyperwriteai\.com|sap\.ai|reka\.ai|app\.loora\.ai|uminal\.org|alphacode\.google\.com|ai21\.com|openrouter\.ai|magical\.team|useblackbox\.io|ai-coustics\.com|chinchilla\.ai|d-id\.com|wav\.ai|openchat\.so|floydhub\.com|bing\.com/chat|copilot\.azure\.com|turing\.microsoft\.com|cosmos\.microsoft\.com|orca\.microsoft\.com|phi\.microsoft\.com|megatron\.microsoft\.com|jarvis\.microsoft\.com|maia\.microsoft\.com|palm\.google\.com|deeplearning\.google\.com|vertexai\.google\.com|ai\.google\.com|deepmind\.google\.com|cloud\.google\.com/ai|cloud\.google\.com/vertex-ai|research\.google\.com/ai|ml\.googleapis\.com|tensor\.google\.com|t5\.google\.com)$
7. Add an OR rule: Medium | matches exactly ($=$) | ai-overviews
8. Save the channel.
9. Move the channel ABOVE the Referral line. This is absolutely crucial because otherwise, the Referral override rule will never trigger, and you won't see the data in the "AI Overviews" group.
10. Done.

3. Data Analysis: How to Interpret the Changes?
After waiting 24–48 hours (the time needed for GA4 to process the data), you can proceed with the analysis.
No more manual searching! Thanks to the new channel grouping, you will start seeing the full picture of AI traffic directly in the default reports (e.g., in the Acquisition Report). You gain immediate data utility, eliminating the need for time-consuming creation of Explorations every time.
What to Expect in Default Reports? (New, True Data)
Implementing Our solution will radically change the traffic picture in the existing channels. Be ready for these changes, as they signify the correct attribution of data to the new AI Search channel:
Referrals Drop: You will notice a 50-80% drop in sessions in the Referral channel.
Organic Search Drop: Sessions in the Organic Search channel may drop by 30-50%.
Important: You are not losing data! You have simply isolated the previously masked sessions into a dedicated AI Search channel. To see the detailed source of AI traffic (e.g., ChatGPT, Claude), use the segmentation by utm_source (Source) in the default reports.
Depth of Analysis: Using Explorations
If you need deeper analysis and want to examine the context used in the AI, leverage the custom dimensions Snippet Start and Snippet End in Explorations.
How to create a contextual report:
Log in to GA4 and go to the EXPLORATIONS section.
Create a new report based on Free-form Exploration.
Add as Dimensions: Snippet Start, Snippet End, and Landing page + query string.
Add as Metrics: Sessions.
Apply a filter to display only sessions where the Default Channel Group is AI Search.
Thanks to this report, you will see not only the number of sessions but also exactly which fragment of text (starting at Snippet Start and ending at Snippet End) attracted the user to the page.
Gain an Analytical Advantage
Tracking the influence of AI on organic traffic is one of the most important elements of analytics today. Implementing our Beecommerce method gives you an advantage in SEO and allows you to quickly react to trends in user behavior. Above all, it allows you to understand the crucial role of AI in acquiring users to your website.
Don't wait until Google officially provides this data – it might never happen. Secure your analytical foundations and start drawing valuable conclusions about the content that is actually building your visibility in the new search era, thus optimizing your SEO efforts.

