Ever since Google rolled out AI Overviews in the Netherlands, many websites have noticed a drop in organic traffic. That’s no coincidence. With AI-generated summaries answering questions right on the results page, fewer people are clicking through to actual websites.
But here’s the good news: if users do click through, there’s still a way to detect that traffic — even though GA4 currently groups it under regular google / organic
.
So… can you track AI Overview clicks?
Not directly. Google doesn’t label this traffic differently in Analytics. But there’s a clever workaround based on how Google links to content from an AI Overview.
When Google pulls a quote or text snippet from your page, it appends something called a URL fragment to the link — more specifically: #:~:text=...
That fragment sends the user directly to a highlighted piece of your content. And that behavior gives us a way to detect when traffic likely came from an AI Overview.
Step-by-step: how to flag AI Overview traffic in GTM
1. Create a Custom JavaScript Variable
- In Google Tag Manager, go to Variables
- Click New → Variable Type: Custom JavaScript
- Name it something like:
AI Overview Trigger (URL Fragment)
- Paste the following code:
function() {
var hasFragment = location.href.includes('#:~:text=');
var isFromGoogle = document.referrer.includes('google.');
return hasFragment && isFromGoogle;
}
This variable checks:
- Whether the page URL contains a
#:~:text=
fragment - Whether the referrer includes “google.” (e.g.
google.com
,google.nl
)
2. Create a GA4 Event Tag
Now that your variable detects AI Overview visits, you can send that signal to GA4 via a custom event tag:
- Go to Tags in GTM
- Create a new tag: Google Analytics: GA4 Event
- Select your existing GA4 Configuration Tag
- Use this for event name:
ai_overview_click
- Optional: Add event parameters like:
traffic_source : ai_overview
3. Set Up the Trigger
- Click Triggering → New
- Select Page View (or Custom Event)
- Set condition:
AI Overview Trigger (URL Fragment)
equalstrue
Save your tag. You now have a functioning event that will fire only when someone lands on your site via an AI Overview link.
Why this matters
Knowing when your site is being referenced in AI Overviews can help you:
- Measure how often Google includes your content in summaries
- Evaluate whether those appearances actually bring in traffic
- Adapt your SEO and content strategy accordingly
Heads-up: Limitations
- This method relies on the current way Google links to content. If Google changes the format, this technique may need updating.
- This only works for sessions where the user actually clicks through — you can’t track impressions.
- Referrer values may be stripped or blocked by browser settings in some cases.
Final thoughts
AI Overviews are here to stay, and they’re already reshaping how people search — and how often they click. But that doesn’t mean you’re in the dark. With a little creativity in GTM, you can start measuring this traffic and take back some visibility.