News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Tracking code insertion

Started by kdmiller45, October 08, 2022, 09:37:02 AM

Previous topic - Next topic

kdmiller45

I have installed a MATOMO server for tracking traffic on my websites where if it can be done would this code go, I would be good with just the first page after logging in to site

Make sure this code is on every page of your website. We recommend pasting it immediately before the closing </head> tag.

<!-- 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="//millerwebtech.com/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    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 -->

Keith

Shades.

Themes>default>index.template.php
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Aleksi "Lex" Kilpinen

Which is it, 2.0 or 2.1? You posted this on both support boards.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: