Skip to main content

Google Tag Manager (GTM)

Source code Package Browser ES5

Google Tag Manager (GTM) is a tag management solution that allows you to create and update tags for your web and mobile applications.

Installation

Install the destination via npm

npm i @elbwalker/destination-web-google-gtm
import { elb } from '@elbwalker/walker.js';
import destinationGoogleGTM from '@elbwalker/destination-web-google-gtm';

elb('walker destination', destinationGoogleGTM, config);

Configuration

Configure your Google Tag Manager destination.

Example

const config = {
custom: {
containerId: "GTM-XXXXXXX",
dataLayer: "dataLayer",
domain: "https://www.googletagmanager.com/gtm.js?id=";
},
};

Custom

PropertyTypeDescription
containerIdstringGoogle Tag Manager container ID.
dataLayerstringName of the dataLayer array.
domainstringSource domain for the Google Tag Manager script.

When using loadScript: true the containerId is required.

info

If you need professional support with your walkerOS implementation, check out our services.