g analytics

pull/146/head
Sam Dulam 2021-05-06 11:59:28 +12:00
parent 38b7e22a96
commit eebc69b609
2 changed files with 18 additions and 0 deletions

16
docs/javascripts/extra.js Normal file
View File

@ -0,0 +1,16 @@
var gtag_id = "G-N7CY67ZGSW";
var script = document.createElement("script");
script.src = "https://www.googletagmanager.com/gtag/js?id=" + gtag_id;
document.head.appendChild(script);
location$.subscribe(function (url) {
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", gtag_id);
});

View File

@ -293,6 +293,8 @@ nav:
extra_css:
- css/extra.css
extra_javascript:
- javascripts/extra.js
theme:
font:
text: Raleway