partial for analytics

This commit is contained in:
ReznoRMichael 2021-02-01 02:11:31 +01:00
commit 8a99de88ae
9 changed files with 101 additions and 69 deletions

View file

@ -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">

View file

@ -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');

View file

@ -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");

View 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>