Measure clicks from AI search results with Google Tag Manager 

Tracking Google AI Overviews in GA4

Screenshot AIO Results
Ralph Grundmann · Last updated on 12.06.2026

Outdated – As of May 2026
This setup measures clicks where a text fragment (#:~:text=) is appended to the target URL. Since the update in early May 2026, this no longer works for AI Overviews – Google now delivers these links as inline links without a text fragment.
Where the setup still applies: For “People Also Ask” (Similar Questions) and classic Featured Snippets, Google continues to link with a text fragment. Therefore, clicks are still being recorded, and we recommend renaming the event for this purpose (e.g., text_fragment_click instead of ai_overview_click).

New in GA4: Since 13 May 2026, GA4 automatically reports traffic from AI assistants (ChatGPT, Gemini, Claude, among others) in a separate “AI Assistant” channel within the Default Channel Group – entirely without a specific setup (Google News on the “AI Agent”). Important: This channel captures chatbot referrals, not Google AI Overviews, which continue to count as Organic Search.

Since Google AI Overviews has been rolled out in search, the way users access websites is changing. AI-generated summaries with further links to external sources appear in the search results. This raises a very practical question for many SEO, content, and analytics teams: How can traffic from Google AI Overviews be made visible in GA4?

There is no direct standard solution for this in Google Analytics 4. However, with a pragmatic setup in Google Tag Manager, such visits can still be tracked. The basis is a so-called Text Fragment in the URL (#:~:text=). This technique allows browsers to jump directly to a specific point on a page and highlight it. Text fragments are part of the URL fragment and are processed client-side, not sent to the server.

This very behaviour can be utilised for tracking: When a user lands on your website via a link with a text fragment, a GTM setup can recognise the passed excerpt and send it as an event to GA4.

 Contact 

Do you want to measure AI overview traffic in GA4 accurately?

Whether it’s GTM setup, event concept, consent mode, or clean evaluation in GA4: We support you in capturing AI-Overview traffic reliably and meaningfully categorising it. Speak to us if you would like to review, expand, or implement your tracking setup directly.

Ein Mann in weißem Hemd lehnt an einer Wand, neben ihm das Rheinwunder Logo
Contact person:
Ralph Grundmann
0228 243 313 53
Contact
Sistrix-zertifizierte Agentur
Microsoft Partner Badge
4.9
Based on 33 reviews
  Trends, strategies & insider knowledge for sustainable online success 

In the blog: The latest trends in SEO, SEA, affiliate marketing, and of course from the Rhine wonder