Skip to content

Commit

Permalink
docs: add Google Analaytics
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsobol authored Jun 15, 2022
2 parents 151a979 + bc70e50 commit 77f7908
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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 => ({
Expand Down Expand Up @@ -38,6 +48,7 @@ module.exports = {
'@vuepress/search'
],
themeConfig: {
GTM_TAG,
repo: 'https://github.com/vuestorefront-community/odoo/',
editLinks: true,
docsDir: 'docs',
Expand Down

0 comments on commit 77f7908

Please sign in to comment.