Merge pull request #545 from torkelrogstad/2019-06-21-ga

Add GA tag
This commit is contained in:
Torkel Rogstad 2019-06-21 09:54:52 +02:00 committed by GitHub
commit 1f363b4586
2 changed files with 11 additions and 0 deletions

View File

@ -130,6 +130,8 @@ const siteConfig = {
"https://buttons.github.io/buttons.js",
"https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",
"https://fonts.googleapis.com/css?family=Montserrat:500",
// Google Analytics
"https://www.googletagmanager.com/gtag/js?id=UA-61958686-2",
`${baseUrl}js/code-block-buttons.js`
],

View File

@ -0,0 +1,9 @@
window.addEventListener("load", function() {
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "UA-61958686-2");
});