@webiny/app-google-tag-manager
v5.2.1
Published
Initializes Google Tag Manager on your website.
Downloads
3
Readme
@webiny/app-google-tag-manager
Initializes Google Tag Manager (https://marketingplatform.google.com/about/tag-manager/) on your site.
Use together with @webiny/api-google-tag-manager package.
Install
npm install --save @webiny/app-google-tag-manager
Or if you prefer yarn:
yarn add @webiny/app-google-tag-manager
Setup
To setup, you must register a set of plugins. For more information on plugins, please visit Webiny documentation.
Admin
import { plugins } from "@webiny/plugins";
import gtmPlugins from "@webiny/app-google-tag-manager/admin"
plugins.register(gtmPlugins);
Enables management of GTM settings, which can be accessed via Settings section in the main menu. You will paste your GTM "Container ID" here (this is required in order for the integration to work properly).
Site
import { plugins } from "@webiny/plugins";
import gtmPlugins from "@webiny/app-google-tag-manager/render"
plugins.register(gtmPlugins);
Initializes Google Tag Manager on your site.