adasd
This commit is contained in:
@@ -15,3 +15,7 @@
|
||||
// Beispiel-Key (unbedingt in Staging durch sicheren Wert ersetzen, 32 Byte, base64)
|
||||
putenv('DATA_KEY=base64:TSLBgK39KnwqMGT+ytJ+O8FwpVm+99VYZwi97TeloBw=');
|
||||
}
|
||||
// Matomo Einstellungen
|
||||
define('MATOMO_URL', 'https://matomo.my-statistics.info/');
|
||||
define('MATOMO_ENABLED', false);
|
||||
define('MATOMO_SITE_ID', 2);
|
||||
@@ -13,5 +13,10 @@
|
||||
// Bitte in Staging per Hosting-ENV setzen; dieses putenv dient nur als Fallback/Beispiel.
|
||||
if (getenv('DATA_KEY') === false) {
|
||||
// Beispiel-Key (unbedingt in Staging durch sicheren Wert ersetzen, 32 Byte, base64)
|
||||
putenv('DATA_KEY=base64:FIanxMlz5/bn7Oyqv57BXVcFelqHV9qj3hkiTDyerls=');
|
||||
putenv('D
|
||||
ATA_KEY=base64:FIanxMlz5/bn7Oyqv57BXVcFelqHV9qj3hkiTDyerls=');
|
||||
}
|
||||
// Matomo Einstellungen
|
||||
define('MATOMO_URL', 'https://matomo.my-statistics.info/');
|
||||
define('MATOMO_ENABLED', false);
|
||||
define('MATOMO_SITE_ID', 3);
|
||||
|
||||
@@ -38,6 +38,7 @@ if ($debugEnabled) {
|
||||
<?php asset_scripts('header'); ?>
|
||||
</head>
|
||||
<body data-auth="<?= isset($_SESSION['user_id']) ? '1' : '0' ?>" data-child-gender="<?= htmlspecialchars($childGender, ENT_QUOTES) ?>">
|
||||
<?php tpl('matomo', 'structure'); ?>
|
||||
<?php tpl('nav', 'structure'); ?>
|
||||
|
||||
<?php if ($debugEnabled): ?>
|
||||
|
||||
39
partials/structure/matomo.php
Normal file
39
partials/structure/matomo.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php if (!defined('MATOMO_SITE_ID')) return; ?>
|
||||
<?php if (!defined('MATOMO_ENABLED') || !MATOMO_ENABLED) return; ?>
|
||||
<?php
|
||||
$matomoDomains = [];
|
||||
$primaryDomain = app_primary_domain();
|
||||
$fakecheckDomain = app_fakecheck_domain();
|
||||
|
||||
$matomoDomains[] = '*.' . $primaryDomain;
|
||||
$matomoDomains[] = '*.' . $fakecheckDomain;
|
||||
$matomoDomains[] = '*.' . $primaryDomain . '/fakecheck';
|
||||
?>
|
||||
|
||||
<!-- Matomo -->
|
||||
<script>
|
||||
var _paq = window._paq = window._paq || [];
|
||||
_paq.push(["setDomains", <?= json_encode($matomoDomains, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?>]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
|
||||
(function() {
|
||||
var u = "<?= rtrim(MATOMO_URL, '/') ?>/";
|
||||
_paq.push(['setTrackerUrl', u + 'matomo.php']);
|
||||
_paq.push(['setSiteId', '<?= MATOMO_SITE_ID ?>']);
|
||||
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true;
|
||||
g.src=u + 'matomo.js';
|
||||
s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<p>
|
||||
<img referrerpolicy="no-referrer-when-downgrade"
|
||||
src="<?= rtrim(MATOMO_URL,'/') ?>/matomo.php?idsite=<?= MATOMO_SITE_ID ?>&rec=1"
|
||||
style="border:0;" alt="" />
|
||||
</p>
|
||||
</noscript>
|
||||
<!-- End Matomo -->
|
||||
Reference in New Issue
Block a user