Connect your site to Google Analytics
Send page views from your published AI site to your own Google Analytics 4 property (and optionally PostHog) by pasting a measurement ID — no rebuild required.
Google Analytics is Google’s web analytics service. On Volnyn, you connect GA4 by storing a measurement ID on the AI project. When the published site is served, Volnyn injects gtag.js into <head> so traffic appears in your GA4 reports.
You can also connect PostHog on the same page for product analytics in a PostHog project you own.
This is send-only for GA4 and PostHog: reports stay in those products. Volnyn does not pull GA4 report data back into the dashboard. For built-in visitor stats inside Volnyn, see Project analytics.
What you can track
With Google Analytics 4 connected:
- Page views on the published AI site
- Standard GA4 acquisition and engagement reports in your own property
- Optional custom events if you ask the assistant to add
gtag/ dataLayer calls in the site code
PostHog (optional on the same settings page):
- Product analytics, funnels, and session tooling in your PostHog project
- Optional EU or self-hosted API host
Prerequisites
Before connecting Google Analytics:
- A Google Analytics account with a GA4 property
- A web data stream in that property
- The stream’s measurement ID (starts with
G-) - An AI-built site in Volnyn (this connect page is for AI sites)
Event collection, retention, and Google Analytics billing are handled by Google, not Volnyn.
How to connect Google Analytics
Step 1: Get your measurement ID
- Sign in to Google Analytics.
- Go to Admin → Data collection and modification → Data streams.
- Open (or create) the Web stream for your site.
- Copy the Measurement ID (for example
G-XXXXXXXXXX).
A measurement ID is expected to appear in browser code. Treat access to the connect page as the control over who can change where events are sent.
Step 2: Paste it in Volnyn
- Open your AI site in the dashboard.
- Go to Analytics under Site health (
/user/site/analytics-connect). - Under Google Analytics 4, paste the measurement ID.
- Optionally fill in PostHog project API key (
phc_…) and API host. - Click Save analytics.
Leave a field empty to turn that provider off.
Step 3: Confirm in Realtime
- Open the published site (not preview/edit) and browse a few pages.
- In Google Analytics, open Reports → Realtime.
- Confirm active users and
page_viewevents.
If nothing appears after a few minutes, check the ID matches the stream and that ad/tracking blockers are not stripping the tag.
How injection works
- Snippets are added when published HTML is served.
- Changes apply on the next page view — you never need to rebuild for GA4/PostHog IDs.
- Snippets are not injected in preview or edit mode, so your own editing does not pollute the numbers.
Classic (non-AI) sites
Theme / Studio sites can use a separate measurement_id on basic settings rendered by classic layouts. The Analytics connect page under Site health is specifically for AI-built websites. If you open it on a non-AI site, Volnyn explains that the page is unavailable.
Limitations
The Google Analytics connection on AI sites:
- Does not OAuth into Google Analytics — you paste the ID
- Does not read GA4 reports back into Volnyn
- Does not support server-side Measurement Protocol secrets from this page
- Does not configure GTM container IDs for AI sites (GA4 + PostHog only here)
- Does not validate that the ID exists in Google — a wrong but well-formed ID saves quietly
Related
- Project analytics — first-party dashboard inside Volnyn
- Publish your Volnyn site — publish before expecting live tracking
- App connectors — chat and workflow integrations
Open App