Volnyn – Website Builder, Domains, Property, Freelancers & Free Games
Open App

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

  1. Sign in to Google Analytics.
  2. Go to Admin → Data collection and modification → Data streams.
  3. Open (or create) the Web stream for your site.
  4. 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

  1. Open your AI site in the dashboard.
  2. Go to Analytics under Site health (/user/site/analytics-connect).
  3. Under Google Analytics 4, paste the measurement ID.
  4. Optionally fill in PostHog project API key (phc_…) and API host.
  5. Click Save analytics.

Leave a field empty to turn that provider off.

Step 3: Confirm in Realtime

  1. Open the published site (not preview/edit) and browse a few pages.
  2. In Google Analytics, open Reports → Realtime.
  3. Confirm active users and page_view events.

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