Skip to main content

Google Tag Manager (GTM)

Web Source code Package

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

PropertyTypeDescriptionMore
containerId*stringGTM Container ID from Google Tag Manager
dataLayerstringCustom dataLayer variable name
domainstringDomain 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.