Skip to content

Commit

Permalink
Added Matomo
Browse files Browse the repository at this point in the history
  • Loading branch information
morandd committed Nov 25, 2024
1 parent 5e7a70a commit 2c81b2b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/Matomo.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.nilu.no/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '31']);
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 -->
2 changes: 2 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import STACTreeView from "../components/STACTreeView.jsx";
import Toaster from "../components/Toaster.astro";
import ChoosePalette from "../components/ChoosePalette.astro";
import COGURL from "../components/COGURL.astro";
import Matomo from "../components/Matomo.astro";
export const prerender = true;
import "../style.css";
Expand Down Expand Up @@ -39,6 +40,7 @@ import "../style.css";

<Toaster />

<Matomo />
</body>
</html>

Expand Down

0 comments on commit 2c81b2b

Please sign in to comment.