Connect Google Analytics 4

Two values, both in the GA4 admin: your web stream's Measurement ID and an API secret created on that same stream.

The fields

FieldWhere to find it
GA4 Measurement IDGA4 > Admin > Data streams > your web stream: identifier in the G-XXXXXXXXXX format
GA4 API secretAdmin > Data streams > open the stream > Measurement Protocol API secrets > Create
GA4 property ID (optional)Resolved automatically from the Measurement ID. Only fill it in to force a specific property.

The API secret must belong to the same stream as the Measurement ID. A secret created on another stream is accepted by Google, but the events show up nowhere.

Verify

A GA4 particularity: Measurement Protocol always answers "OK", even to a broken payload. There is no external validation. Check in two places:

  1. The Delivered rate in your client area's Monitoring.
  2. GA4 > Reports > Realtime: send a test event and watch it arrive.

Channel attribution

Events are sent with the session identifier and the page referrer, which lets GA4 attach conversions to their acquisition channel instead of filing them under "Unassigned".

If you see duplicates

GA4 only deduplicates the purchase event, and only by transaction_id. Recent DataFirefly modules therefore no longer send the purchase from the browser: if you see duplicated purchases, update the module.

Updated: September 1, 2026