matomo tags code

Post

Posted
Rating:
#7878 (In Topic #2010)
How do I add matomo tags code like this?

 
<!-- Matomo Tag Manager -->
<script>
  var _mtm = window._mtm = window._mtm || [];
  _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
  (function() {
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src='xxxxx/container_xxxxx.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Tag Manager -->

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by PDStig)
#7880
Hi, make a copy of themes/default/templates/HTML_HEAD.tpl in themes/default/templates_custom and add the code to the custom copy. Remember to clear your caches.

Post

Posted
Rating:
#7890
For additional information, there is also an active tracker issue for "de-Googleification" which includes possibly supporting Matomo natively within Composr.

Please have a look and consider monitoring and/or commenting your use case if you'd like to see it implemented:

0003540: De-Googleificiation (idea staging issue) - Composr CMS feature tracker
1 guest and 0 members have recently viewed this.