Google Analytics 4
CCCFreeFree event-based web analytics; the Data API turns it into a feed an agent can read.
What it is
Google Analytics 4 is the current version of Google's free web and app analytics. It is event-based: page views, clicks, sign-ups and purchases are all events with parameters, and you define which events count as conversions. The standard reports cover acquisition (which channel sent the visit), engagement (what people did) and monetization. Search Console linking adds the queries people typed before they arrived.
For an AI-operated company the useful half is the Data API. Instead of reading dashboards, you pull daily rows into your own database or straight into an agent's context: "which posts brought sign-ups this week", "which landing pages lost traffic after the release". Google Tag Manager or a direct gtag snippet sends the events; a service account with read access to the property pulls them back out.
Where it fits in the AI OS
GTM & content, the measurement step that closes the loop. Without it, the content pipeline optimizes for impressions on the social platform; with it, you optimize for visits that turned into members.
Insider notes
membersHow Serge's stack uses it
The live bulaev.ai site already carries a GA4 tag, and the membership site keeps it. The site platform behind it has a ga4-client module that reads the GA4 Data API through a service account and stores daily SEO and analytics rows for the admin dashboard; the membership spec mirrors its product events (sign-up, upgrade, post created) into gtag('event') so both systems see the same funnel. Cloudflare Web Analytics is used alongside it, and an open item covers cookie consent for EU and UK visitors before GA4 loads there.
Setup in 5 minutes
- Create a GA4 property and a web data stream; copy the measurement id.
- Add the
gtag.jssnippet (or a Next.js<Script>component) to the layout; confirm hits in the Realtime report. - Mark
sign_upandpurchaseas key events. - Link Search Console under Admin → Product links.
- For the Data API: create a service account in Google Cloud, enable the Analytics Data API, add the account's email as a Viewer on the property, and run one
runReportcall forsessionsbydate.
Alternatives
- Cloudflare Web Analytics — privacy-friendly, no cookies, no consent banner needed; fewer dimensions.
- Plausible / Fathom / Umami — lightweight, GDPR-friendly, paid or self-hosted.
- PostHog — product analytics with session replay and feature flags.