View source for How to Add Matamo/Piwiki Tracking Code?

Hi, I wanted to add some tracking code to my WackoWiki instance.  I successfully did this in the 5.4 version in the common _header.php.  I just upgraded to the latest, 5.5.7 and it's changed to _header.tpl.  I'm not familiar enough with the template being used and not able to add my tracking JS in there like I did before.  An example of the JS is as follows:

%%
<!-- Matomo -->
<script type="text/javascript">
  var _paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//myTrackerUrl/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', 'mySiteId123']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->
%%
If JS no longer works or is allowed, I can do it by a hidden image but I was curious how I can get the Name of the page so I can accurately track which pages a user visited by passing it as a query string parameter to my image src.

Thanks