made matomo wait for user consent, moved to a separate script

This commit is contained in:
Bea 2020-07-10 12:25:16 +02:00
parent 23c5a5eefc
commit fbf29736d3
5 changed files with 10 additions and 65 deletions

View File

@ -14,22 +14,8 @@
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<title>Mind Overflow : Home</title> <title>Mind Overflow : Home</title>
<!-- Matomo --> <script src="/scripts/matomo.js" type="text/javascript"></script>
<script type="text/javascript"> <script src="/scripts/policy-popup.js" type="text/javascript"></script>
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//admin.mind-overflow.net/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<script src="/scripts/policy-popup.js"></script>
<!-- Scripts End --> <!-- Scripts End -->
</head> </head>

View File

@ -11,22 +11,8 @@
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script src="/scripts/arrow-fade.js"></script> <script src="/scripts/arrow-fade.js"></script>
<!-- Matomo --> <script src="/scripts/matomo.js" type="text/javascript"></script>
<script type="text/javascript"> <script src="/scripts/policy-popup.js" type="text/javascript"></script>
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//admin.mind-overflow.net/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<script src="/scripts/policy-popup.js"></script>
</head> </head>

View File

@ -10,23 +10,9 @@
integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script src="/scripts/arrow-fade.js"></script> <script src="/scripts/arrow-fade.js"></script>
<!-- Matomo --> <script src="/scripts/matomo.js" type="text/javascript"></script>
<script type="text/javascript"> <script src="/scripts/policy-popup.js" type="text/javascript"></script>
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//admin.mind-overflow.net/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<script src="/scripts/policy-popup.js"></script>
</head> </head>
<body onload="openPolicyPopup()"> <body onload="openPolicyPopup()">

View File

@ -11,22 +11,8 @@
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script src="/scripts/arrow-fade.js"></script> <script src="/scripts/arrow-fade.js"></script>
<!-- Matomo --> <script src="/scripts/matomo.js" type="text/javascript"></script>
<script type="text/javascript"> <script src="/scripts/policy-popup.js" type="text/javascript"></script>
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//admin.mind-overflow.net/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<script src="/scripts/policy-popup.js"></script>
</head> </head>
<body onload="openPolicyPopup()"> <body onload="openPolicyPopup()">

1
scripts/matomo.js Normal file
View File

@ -0,0 +1 @@
// JavaScript Document