Skip to content

Commit

Permalink
ga
Browse files Browse the repository at this point in the history
  • Loading branch information
telatin committed Dec 10, 2024
1 parent 0a46471 commit ee02e5a
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,26 +156,14 @@ <h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span cl
data-cfasync="false"></script>

<!-- Add google analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>

<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q12CPTSQDT"></script>
<script>
// Reads the value of a cookie by name or returns empty string
function getCookie(name) {
var b = document.cookie.match('(^|[^;]+)\\s*' + name + '\\s*=\\s*([^;]+)');
return b ? b.pop() : '';
}

// Actually starting analytics up
function addAnalytics() {
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('js', new Date());
gtag('config', 'UA-XXXXXXXX-X');
}
gtag('config', 'G-Q12CPTSQDT');
</script>

// Waiting for the load event
window.addEventListener("load", function () {
Expand Down

0 comments on commit ee02e5a

Please sign in to comment.