Skip to content

Commit

Permalink
Disable matomo cookies (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpirix authored Dec 23, 2023
1 parent d27e30b commit 3b91ae7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions qgis-app/templates/matomo/tracking_code.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = "{{ url }}";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '{{ id }}']);
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
</script>
<noscript>
<img src="{{ url }}matomo.php?idsite={{ id }}&rec=1" style="border:0" alt="" />
</noscript>

0 comments on commit 3b91ae7

Please sign in to comment.