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

Custom Config
Result

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.

Mapping

Using the dataLayer.push function to send events to Google Tag Manager.

add_to_cart

Event
Custom Config
Result

purchase

Event
Custom Config
Result
info

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