Skip to content

Commit

Permalink
Added MG.net Google Analytics tag to docs site. (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomspilman authored Sep 26, 2024
1 parent 5657514 commit ef84c4c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions templates/monogame/partials/theme.tmpl.partial
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-38431038-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-38431038-1');
</script>

<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
Expand Down

0 comments on commit ef84c4c

Please sign in to comment.