partial for analytics
This commit is contained in:
parent
2244240dc8
commit
8a99de88ae
9 changed files with 101 additions and 69 deletions
|
|
@ -2,30 +2,6 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136831794-2"></script>
|
||||
<script>
|
||||
// Temporarily disable the tracking for testing (set to false to enable Analytics)
|
||||
window['ga-disable-UA-136831794-2'] = false;
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
// Default no consent to share cookie data
|
||||
/* gtag('consent', 'default', {
|
||||
'ad_storage': 'denied',
|
||||
'analytics_storage': 'denied'
|
||||
}); */
|
||||
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-136831794-2');
|
||||
</script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link href="favicon.png" rel="icon">
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/* eslint-disable no-undef */
|
||||
// Temporarily disable the tracking for testing (set to false to enable Analytics)
|
||||
window['ga-disable-UA-136831794-2'] = false;
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
// Default no consent to share cookie data
|
||||
gtag('consent', 'default', {
|
||||
'ad_storage': 'denied',
|
||||
'analytics_storage': 'denied'
|
||||
});
|
||||
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-136831794-2');
|
||||
|
|
@ -10,9 +10,6 @@ require("../img/thumbnail1200x628.jpg");
|
|||
// Instantly load test save file from .json (fast Debugging script)
|
||||
// require("./LoadJson.js");
|
||||
|
||||
// Google Analytics start script
|
||||
// require("./analytics.js")
|
||||
|
||||
// Load Save File for opening files, decoding, decryption
|
||||
require("./LoadSaveFile.js");
|
||||
|
||||
|
|
|
|||
22
src/partials/analytics.html
Normal file
22
src/partials/analytics.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= ga_property_id %>"></script>
|
||||
<script>
|
||||
// Temporarily disable the tracking for testing (set to false to enable Analytics)
|
||||
window['ga-disable-<%= ga_property_id %>'] = true;
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
|
||||
// Default no consent to share cookie data
|
||||
/* gtag('consent', 'default', {
|
||||
'ad_storage': 'denied',
|
||||
'analytics_storage': 'denied'
|
||||
}); */
|
||||
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '<%= ga_property_id %>');
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue