Organic Traffic Dropping? AI Overviews May Be The Cause

With Google’s AI Mode rolling out and AI Overviews becoming standard in the SERPs, a growing share of user click journeys are now starting through these AI-generated summaries. But here’s the downside: these aren’t your typical organic clicks, and they’re virtually invisible in Google Analytics 4 or Google Search Console.

In GA4, you may have noticed a gradual decline in organic sessions or an uptick in direct or referral traffic. That’s not coincidence. AI Overview clicks aren’t pulling through referrals or source/medium data, meaning GA4 can’t categorize them properly. Google isn’t surfacing this data (yet), but it’s already skewing performance reporting, especially for content-led acquisition strategies.

There are visibility tools out there – SEMRush, Ahrefs, and others, that can show whether your site appears in an AI Overview. But they don’t answer key questions like:

These are critical questions if we want to understand, adapt to, and optimise for AIO-driven traffic.

I’ve found two ways of trying to track AI Overview exposure and clicks:

1) AI Automation hooking into SerpAPI data to pull back who appeared in an AI Overview for a given query and the content.

2) A Scrappy GA4 method of tracking potential AI Overview clicks into site using the text fragment in the URL

Both of these methods are in no way a means to an end, but will give you deeper visibility than what you have right now.

The #:~:text= Fragment

This may be common knowledge to some, I’m not sure – but you can try this yourself. Most links cited within an AI Overview will use a text fragment from your own website to generate its own description snippet.

A text fragment will typically look like this:

malcolmgibb.co.uk/ppc-consultant-edinburgh#:~:text=I%20Help%20Businesses%20Scale%20With%20Expertly%20Managed

The #:~:text= is not a query parameter, but a fragment which exists client-side. Appended to the fragment is the exact piece of text that Google has used to generate an AI Overview snippet of your site or page.

When you click through on a URL like this, it will automatically take you to the fragment text on the page.

Now, here are some pitfalls to this proposed solutions:

If we are able to extract the #:~:text= fragment, then we can in some certainty infer that a click originated from an AI Overview result – and we can also use the extracted fragment to understand what Google is matching an AI result to on our page to drive optimisations.

Tracking AI Overview Clicks in Google Analytics 4: Solution

Disclaimer here: This may or may not work in your setup or website situation, and it is a relatively scrappy way to pull in data to GA4 – but the end result should work to a degree.

What you need:

In summary – this solution will:


Set up a Custom Javascript Variable in Google Tag Manager

function() { 
var nav = performance.getEntriesByType('navigation')[0]; 
var match = nav && nav.name.match(/#:~:text=([^&]+)/); 
return match ? decodeURIComponent(match[1]) : undefined;
}

This Javascript will get the whole URL, check if there is a fragment and then extract the fragment. Is nothing is there it will return ‘undefined’.

Use a custom javascript variable to extract and define the fragment

Set up a Trigger in Google Tag Manager

Trigger when your text fragment is not undefined

Set up a New Google Analytics 4 Event Tag

Setting up a new tag in Google Tag Manager with an event parameter of snippet_text

Publish & Test

console.log('Extracted snippet:', (function(){
  const nav = performance.getEntriesByType('navigation')[0];
  return nav && nav.name.match(/#:~:text=([^&]+)/) ? decodeURIComponent(nav.name.match(/#:~:text=([^&]+)/)[1]) : 'Not found';
})());

If the command returns an extracted snippet then the variable has worked, and if setup correctly the tag and trigger should have fired.

GA4 Event Scoped Custom Dimension

(Optional) Setting up an event scoped custom dimension in GA4 will let you segment and find data easily

Test again, this time use Real-Time reporting in GA4 and re-enter the url with a fragment appended. You should start to see events trigger in the real-time report like the following, along with the event parameters of the snippet_text that was set up.

Check the real-time reports in GA4 to test the event with a text fragment in the url

And… that’s it. That’s how we extract the text fragment from a likely AI Overview click, whilst also pulling in the exact text that was used by the AI for analysis further down the road.

If this doesn’t work out of the box, some debugging and trial and error may be needed. Personally, it took a whole day of debugging to get this working – mainly due to the fact that fragments get stripped out fast and are not similar to query parameters when it comes to tracking and pushing data in.

There are possibly other ways of tracking AI Overviews in GA4, I would love to hear them if anyone has a better way!