Google Analytics 4 (GA4)
Google Analytics 4 (GA4) configuration within the unified gtag destination. This allows you to send events to GA4 with enhanced measurement features and flexible event tracking.
Installation
npm install @walkeros/web-destination-gtag
Setup
import { createCollector } from '@walkeros/collector';
import { destinationGtag } from '@walkeros/web-destination-gtag';
const { elb } = await createCollector();
elb('walker destination', destinationGtag, {
settings: {
ga4: {
measurementId: 'G-XXXXXXXXXX',
},
},
});
Configuration reference
Property | Type | Description | More |
---|---|---|---|
measurementId* | string | GA4 Measurement ID from Google Analytics | |
debug | boolean | Enable debug mode for GA4 | |
include | Include[] | Array of properties to include in events | |
pageview | boolean | Enable automatic pageview tracking | |
server_container_url | string | Server-side GTM container URL | |
snakeCase | boolean | Convert parameter names to snake_case | |
transport_url | string | Custom transport URL for GA4 |
* Required fields
Event Mapping
For custom event mapping (mapping.entity.action.settings.ga4
):
Property | Type | Description | More |
---|---|---|---|
include | Include[] | Array of properties to include in this specific event |
💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.