Add Google Analytics to webpages (#934)

## Description

Add Google Analytics to docs and website

This can only be tested in production for docs but it looks like the HTML does the right thing.

## Type of change

- [x] 🌻 Feature


## Test Plan

- [x] 💪 Manual
This commit is contained in:
Niraj Tolia 2022-09-23 08:37:12 -07:00 committed by GitHub
parent c145f711ee
commit 4d02650f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -46,6 +46,9 @@ const config = {
'https://github.com/alcionai/corso/tree/main/docs',
},
blog: false,
googleAnalytics: {
trackingID: 'G-4EXT1PY6KC',
},
theme: {
customCss: require.resolve('./src/css/custom.scss'),
},

View File

@ -9,6 +9,16 @@
@@include("partials/head-css.html")
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YXBFPQZ05N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-YXBFPQZ05N');
</script>
@@include("partials/body.html")
<!-- Loader Start -->
<!-- <div id="preloader">