Google Analytics 4 (Collect)
Server-side event delivery to Google Analytics 4 via the /collect endpoint, mirroring the client-side gtag.js payload format.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
measurement_id | string | Yes | The Measurement ID for your GA4 web data stream. Found in Admin > Data Streams > Web. |
api_secret | secret | Yes | Measurement Protocol API secret. Create one in Admin > Data Streams > Measurement Protocol API secrets. |
client_id_field | string | Yes | The event property name that contains the GA4 client ID (e.g. from the _ga cookie). Used to associate server-side events with the correct user session. |
Quick Setup
- Navigate to Integrations in the sidebar.
- Open the Integration Library tab.
- Find Google Analytics 4 (Collect) or filter by Analytics.
- Click Install, select a variant if available, and fill in the required fields.
- Click Install Integration to create the integration with a ready-to-use default configuration.
API Setup
curl -X POST http://localhost:8084/v1/admin/integration-catalog/ga4_collect/install \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Google Analytics 4 (Collect)",
"variant": "default",
"config": {
"measurement_id": "G-XXXXXXXXXX",
"api_secret": "your_api_secret",
"client_id_field": "client_id"
},
"delivery_mode": "server_side"
}'Delivery
Events are delivered server-side from your Datafly Signal infrastructure directly to the Google Analytics 4 API. No client-side scripts are loaded for this integration.
Visit Google Analytics 4 (Collect) documentation for full API documentation and credential setup instructions.