Awesome! Been hoping for a piwik extension
Installed fine and activated.
I see in the html
<script type="text/javascript">
var _paq = _paq || [];
//1st
_paq.push(['setDocumentTitle', document.domain + '/' + document.title]);
//3rd
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//domain.tld/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
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+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//domain.tld/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
From this part -> _paq.push(['setSiteId', 1]);
It looks like it defaults to being set as SiteId 1
I'm tracking multiple sites and my flarum one is currently site ID 4 (according to my piwik admin spot)
Looking at my "tracking code" in the piwik admin it shows this: (notice the site id is 4)
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//domain.tld/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 4]);
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+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//domain.tld/piwik.php?idsite=4" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
So unfortunately this won't work for me atm 🙁
However! if you're just tracking one site it should default to site id 1 and be fine.