Google Tag Manager (GTM)
Google Tag Manager (GTM) configuration within the unified gtag destination. This allows you to send events to your GTM container for advanced tag management and third-party integrations.
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: {
gtm: {
containerId: 'GTM-XXXXXXX', // Required
dataLayer: 'dataLayer', // Optional custom dataLayer name
},
},
});
Configuration reference
Property | Type | Description | More |
---|---|---|---|
containerId* | string | GTM Container ID from Google Tag Manager | |
dataLayer | string | Custom dataLayer variable name | |
domain | string | Domain for GTM script loading |
* Required fields
Event Mapping
GTM specific event mapping (mapping.entity.action.settings.gtm
) currently has
no configurable properties. The GTMMapping interface is empty, so events are
passed through to GTM without additional transformation options.
💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.