Skip to content

Commit

Permalink
matomo script fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikolajczyk committed Oct 8, 2024
1 parent e905f17 commit 171ac5f
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,24 @@
<meta property="og:type" content="website" />
<!-- Matomo -->
<script>
// TODO: UNCOMMENT AFTER TESTS!!!
// if(window.location.origin !== 'https://octant.app') {return;};

// TODO: REMOVE AFTER TESTS!!!
if(window.location.origin !== 'https://uat-client.octant.wildland.dev') {return;}

var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["disableCampaignParameters"]);
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.golem.foundation/";
_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);
})();
// TODO: CHANGE 'https://uat-client.octant.wildland.dev' TO 'https://octant.app' AFTER TESTS!!!
if(window.location.origin === 'https://uat-client.octant.wildland.dev') {
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["disableCampaignParameters"]);
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.golem.foundation/";
_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);
})();
}
</script>
<!-- End Matomo Code -->
<title>Octant App</title>
Expand Down

0 comments on commit 171ac5f

Please sign in to comment.