From 29ba2245a3d48d8ad71cfc906e48f75a64ace7ae Mon Sep 17 00:00:00 2001 From: Josue Alexander Ibarra <1480657+ibarrajo@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:14:50 -0700 Subject: [PATCH] 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 --- src/.vuepress/config.js | 7 ++++++- src/blog/.vuepress/config.js | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index 8e63ede4a..e15b9b82e 100644 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -32,6 +32,11 @@ module.exports = { ], head: [ ['link', { rel: 'icon', href: `/img/favicon.ico` }], + ['script', { + async: true, + src: 'https://www.googletagmanager.com/gtag/js?id=G-W63QD8QE6E' + }], + ['script', {}, `window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-W63QD8QE6E');`], ], themeConfig: { ...themeConfig, @@ -43,7 +48,7 @@ module.exports = { { title: 'Get Started', path: '/docs/01-get-started', - children:[ + children: [ '01-get-started/', '01-get-started/01-server-installation', '01-get-started/02-java-hello-world', diff --git a/src/blog/.vuepress/config.js b/src/blog/.vuepress/config.js index 29c307001..dc457c86a 100755 --- a/src/blog/.vuepress/config.js +++ b/src/blog/.vuepress/config.js @@ -41,4 +41,11 @@ module.exports = { }, summaryLength: 1000, }, + head: [ + ['script', { + async: true, + src: 'https://www.googletagmanager.com/gtag/js?id=G-W63QD8QE6E' + }], + ['script', {}, `window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-W63QD8QE6E');`], + ], }