analytics : add Google Analytics (gtag.js) snippet
All checks were successful
Deploy Production / Deploy to Production (push) Successful in 26s
All checks were successful
Deploy Production / Deploy to Production (push) Successful in 26s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
459fadf0a4
commit
56e4e55791
2 changed files with 11 additions and 0 deletions
9
site/snippets/gtag.php
Normal file
9
site/snippets/gtag.php
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!-- Google tag (gtag.js) -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-984WQ2N19V"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'G-984WQ2N19V');
|
||||||
|
</script>
|
||||||
|
|
@ -41,6 +41,8 @@
|
||||||
<?php if ($site->faviconICO()->isNotEmpty()): ?>
|
<?php if ($site->faviconICO()->isNotEmpty()): ?>
|
||||||
<link rel="shortcut icon" href="<?= $site->faviconICO()->toFile()->url() ?>" />
|
<link rel="shortcut icon" href="<?= $site->faviconICO()->toFile()->url() ?>" />
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php snippet('gtag') ?>
|
||||||
</head>
|
</head>
|
||||||
<body data-template="<?= $page->intendedTemplate() ?>">
|
<body data-template="<?= $page->intendedTemplate() ?>">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue