Skip to content

Commit

Permalink
replace matomo tracking with new code from OSPO instance
Browse files Browse the repository at this point in the history
  • Loading branch information
insectengine committed Mar 18, 2024
1 parent e4a2ffb commit 835025e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
{% endfor %}
<link rel="alternate" hreflang="x-default" href="https://quarkus.io/" />
<script src="{{ site.baseurl }}/assets/javascript/tracking.js"></script>
<script src="https://analytics.ossupstream.org/matomo.js" async defer></script>
</head>

<body class="{% if page.url == '/' %}homepage{% else %}{{page.layout}}{% endif %}">
Expand Down
17 changes: 10 additions & 7 deletions assets/javascript/tracking.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
var idSite = 4;
var matomoTrackingApiUrl = 'https://analytics.ossupstream.org/matomo.php';

var _paq = window._paq = window._paq || [];
_paq.push(['setTrackerUrl', matomoTrackingApiUrl]);
_paq.push(['setSiteId', idSite]);
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//route-default-test-mscherer-matamo.apps.ospo-osci.z3b1.p1.openshiftapps.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '2']);
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 835025e

Please sign in to comment.