diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 60e202d3..7ed59723 100755 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,4 +1,5 @@ -const { description } = require('../../package') +const { description } = require('../../package'); +const GTM_TAG = 'GTM-WMDC3CP'; module.exports = { title: 'Vue Storefront 2 for Odoo', @@ -8,7 +9,16 @@ module.exports = { ['link', { rel: 'icon', href: '/favicon.png' }], ['meta', { name: 'theme-color', content: '#3eaf7c' }], ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], - ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }] + ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], + + // Google Tag Manager + ['script', {}, [` + (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': + new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], + j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= + 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); + })(window,document,'script','dataLayer','${GTM_TAG}'); + `]], ], configureWebpack: (config) => { config.module.rules = config.module.rules.map(rule => ({ @@ -38,6 +48,7 @@ module.exports = { '@vuepress/search' ], themeConfig: { + GTM_TAG, repo: 'https://github.com/vuestorefront-community/odoo/', editLinks: true, docsDir: 'docs',