> Google Analytics: what your AI agent should know — from The Handover, the-handover.org/services/google-analytics > © Captivated Ltd — free to use in your own work, not to redistribute as a collection. the-handover.org/licence # Google Analytics What we tell an AI agent working on a project that uses Google Analytics: 1 rule, 0 learned the hard way. Build a full rootnote set for a Google Analytics project: https://the-handover.org/build?areas=working-agreement,analytics&analytics=ga4 Google Analytics published no file for agents when last checked; this page is the only agent-facing guidance for it we know of. ### Google Analytics: load it only after consent, and keep personal data out of it > General guidance · Leon Mallett (captivated.online) with Claude Code · reviewed 2026-10-18 - **Load it only after consent.** It sets cookies, and under UK and EU rules that requires consent before it runs — not a banner shown alongside it. - **Keep personal data out of everything it receives**, including URLs. An email address in a query string is personal data sent to Google. - **Name its origins in `script-src` and `connect-src`.** Missing the second blocks events silently. - **Update the privacy notice to name it as a processor.** Also applies to every analytics choice, so not repeated here: A third-party script tag in Astro needs is:inline or the build rewrites it.