Google Gtag
The Google Gtag destination provides a unified interface for sending events to Google Analytics 4 (GA4), Google Ads, and Google Tag Manager (GTM) through a single destination configuration.
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', // Required for GA4
},
ads: {
conversionId: 'AW-XXXXXXXXX', // Required for Google Ads
},
gtm: {
containerId: 'GTM-XXXXXXX', // Required for GTM
},
},
});
Configuration reference
Property | Type | Description | More |
---|---|---|---|
ga4 | GA4Settings | GA4-specific configuration settings | |
ads | AdsSettings | Google Ads specific configuration settings | |
gtm | GTMSettings | Google Tag Manager specific configuration settings |
Event Mapping
For custom event mapping (mapping.entity.action.settings
):
Property | Type | Description | More |
---|---|---|---|
ga4 | GA4Mapping | GA4-specific event mapping configuration | |
ads | AdsMapping | Google Ads specific event mapping configuration | |
gtm | GTMMapping | GTM specific event mapping configuration |
💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.