Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
add matomoto script in basic template (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akiyamka authored Dec 19, 2023
1 parent ee02ba5 commit 8dda2ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions themes/qgis-theme/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{% set script_files = script_files + ['_static/qgis-site.js']%}
{% set script_files = script_files + ['_static/bootstrap-2.3.2/js/bootstrap.min.js']%}
{% set script_files = script_files + ['_static/jquery.countdown-2.0.4/jquery.countdown.min.js']%}
{% set script_files = script_files + ['_static/matomoto.min.js']%}

{%- block extrahead %}
<meta charset='utf-8'>
Expand Down
12 changes: 12 additions & 0 deletions themes/qgis-theme/static/matomoto.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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="//matomo.qgis.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
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);
})();

0 comments on commit 8dda2ee

Please sign in to comment.