nuxt-google-tag-manager
v0.1.0
Published
Nuxt.js module for google tag manager, forked from official modules repo to add custom settings
Downloads
6
Readme
nuxt-google-tag-manager
Nuxt.js module for google tag manager, forked from official modules repo to add custom settings
Features
The module features
Setup
- Add
nuxt-google-tag-manager
dependency using yarn or npm to your project - Add
nuxt-google-tag-manager
tomodules
section ofnuxt.config.js
{
modules: [
['@nuxtjs/google-tag-manager', { id: 'GTM-XXXXXXX' }],
]
}
Options
id
- Required
Should be in form of
GTM-XXXXXXX
Other options
{
layer: 'dataLayer',
env: {
gtm_auth: '...',
gtm_preview: '...',
gtm_cookies_win: '...'
},
scriptURL: '//example.com',
delay: 300 // (ms) the time delay to wait for page transition before firing event
}
Development
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Start development server using
npm run dev
License
Copyright (c) DaxChen [email protected]