Skip to content

Commit 29ba224

Browse files
authored
Adding GA tracking code on site and blog (#192)
* adding GA tracking code on site and blog * Update config.js with Uber GA code * Update config.js with Uber GA code
1 parent 4a96012 commit 29ba224

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/.vuepress/config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ module.exports = {
3232
],
3333
head: [
3434
['link', { rel: 'icon', href: `/img/favicon.ico` }],
35+
['script', {
36+
async: true,
37+
src: 'https://www.googletagmanager.com/gtag/js?id=G-W63QD8QE6E'
38+
}],
39+
['script', {}, `window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-W63QD8QE6E');`],
3540
],
3641
themeConfig: {
3742
...themeConfig,
@@ -43,7 +48,7 @@ module.exports = {
4348
{
4449
title: 'Get Started',
4550
path: '/docs/01-get-started',
46-
children:[
51+
children: [
4752
'01-get-started/',
4853
'01-get-started/01-server-installation',
4954
'01-get-started/02-java-hello-world',

src/blog/.vuepress/config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,11 @@ module.exports = {
4141
},
4242
summaryLength: 1000,
4343
},
44+
head: [
45+
['script', {
46+
async: true,
47+
src: 'https://www.googletagmanager.com/gtag/js?id=G-W63QD8QE6E'
48+
}],
49+
['script', {}, `window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-W63QD8QE6E');`],
50+
],
4451
}

0 commit comments

Comments
 (0)