Skip to content

Commit

Permalink
some fixes to matomo
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-gaurav committed Jul 19, 2020
1 parent 91738fe commit 59d8665
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
<script src="app/index.ts"></script>

<!-- Matomo -->
<script type="text/javascript">
<script type="text/javascript" id="matomo">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
Expand All @@ -221,9 +221,17 @@
var u = "//analytics.deepraven.co/";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '1']);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
var d = document, g = d.createElement('script'), s = d.getElementById("matomo");
g.type = 'text/javascript'; g.async = true; g.defer = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s);
})();

window.addEventListener('hashchange', function() {
_paq.push(['setCustomUrl', '/' + window.location.hash.substr(1)]);
_paq.push(['setDocumentTitle', 'My New Title']);
_paq.push(['setGenerationTimeMs', 0]);
_paq.push(['trackPageView']);
});

</script>
<!-- End Matomo Code -->

Expand Down

1 comment on commit 59d8665

@vercel
Copy link

@vercel vercel bot commented on 59d8665 Jul 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.