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.