Skip to main
← Index

Connect Google Analytics 4 (Measurement Protocol)

Send your server-side events to GA4 via Google OAuth (automatic provisioning) or by pasting a Measurement ID + API secret.

Walityk forwards your events to GA4 through the Measurement Protocol, server-side. Two methods: automatic OAuth connection (recommended) or manual entry.

Takes 3 minutes.

Prerequisites

  • The Walityk tag installed and events flowing (check the site’s live event stream).
  • A GA4 property with a Web data stream.
  • For the automatic connection: a Google account with the Editor or Admin role on the GA4 property.
  1. Walityk dashboard → Destinations → pick your site.
  2. On the Google Analytics 4 — automatic connection card, click Connect Google Analytics.
  3. Sign in with the Google account that has access to your GA4 property.
  4. Pick the property from the list. Walityk creates the Measurement Protocol secret and provisions the Walityk custom dimensions automatically.

That’s it: no secret to copy-paste, and the Re-provision Walityk dimensions button stays available if you ever delete a dimension on the GA4 side by mistake.

Walityk dashboard Destinations page: Google Analytics 4 card connected via Google, plus the Meta CAPI form

Method 2 — Measurement ID + API secret (manual)

  1. Open GA4 Admin → Data streams and select your Web stream.
  2. Copy the Measurement ID (G-XXXXXXX format), shown at the top right of the panel.
  3. Below, open Measurement Protocol API secretsCreate, name it (e.g. walityk) and copy the generated value.
  4. In Walityk → Destinations → your site → Google Analytics 4 card: paste the Measurement ID and API Secret, then Save.

Without an API secret, GA4 silently ignores server-side hits. That’s pitfall #1.

Choosing forwarded events

The GA4 card shows a checklist: page views, product view, add to cart, begin checkout, purchase, sign-up, login, lead, custom events.

  • Everything checked (default): all events are forwarded.
  • Uncheck a type to keep it out of GA4. Skipped events show as “skipped” in the delivery log — that’s expected.

Verify

  1. Click Check that events arrive → after saving (or Destinations → your site → Google Analytics 4).
  2. On the Google side: GA4 → Reports → Realtime. Server-side events show up within seconds.

Known pitfalls

  • Invalid Measurement ID: check the G-XXXXXXX format (not the numeric property ID, not a UA-).
  • Cookieless mode: without consent, GA4 receives a random per-session client_id and no user_id — audience reports are limited, by design (compliance).
  • Expired OAuth connection: if the log shows authorization errors, disconnect then reconnect Google Analytics from the card.

Next steps

Need help? hi@walityk.com.