We use matomo internally to get stats on all our sites to better understand flow and usages.
I need to put similar code into the headers of the ossn site. I obviously do not want to edit every single file.
I've searched Google and this site and cannot find anyone asking about this.
Does someone know how I can add tracking code so that it will be across the entire site?
I think you said it :).
CustomHeaderCode perhaps?
Anyhow, the component is working perfectly. Thanks.
Yes, that's what I was trying to express with "This component will add your Google Analytics code or anything similar to the head section of your site."
Feel free to suggest a better component description - I'm not a native English speaker
Nice, that works perfectly.
If I end up using Google or Bing or something else, can I simply add the code into this as well?
Ok, I'll download it as soon as I see it and see what happens.
7.1 is already available
I tried it but,
"This component requires OSSN 7.1 or higher"
I guess it means I have to wait for the 7.1 premium?
Give it a try and install Google Analytics
https://www.opensource-socialnetwork.org/component/view/2332
It's basically capable of inserting ANY valid code into the <head>
section of Ossn sites.
Re BTW:
No question, 1 line of code will execute faster than 1000 lines. :) Thus, in the end it depends on the very component (will it load 3rd party scripts, extra fonts, whatever?). Just use your browser's developer console to compare load times with a component enabled/disabled.
Hi,
Sure, it looks like this (edited)
<!-- 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="https://tracking.domain.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '10']);
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 -->
BTW, does adding components start bogging down the site eventually? I would want to limit the number of components the site is using if possible.
Please provide the matamo code snippet in question ...
maybe the Google Analytics component will do
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)