cessda / cessda.guidelines.public

CESSDA Technical Guidelines
https://docs.tech.cessda.eu/
Creative Commons Attribution 4.0 International
0 stars 2 forks source link

Add matomo support #36

Closed cessda-bitbucket-importer closed 3 years ago

cessda-bitbucket-importer commented 3 years ago

Original report on BitBucket by Carsten Thiel (GitHub: schildwaechter).


cessda-bitbucket-importer commented 3 years ago

Original comment by John Shepherdson (GitHub: john-shepherdson).


@openconcept Please add a website to Motomo:

‘Technical Guidelines’ https://docs.tech.cessda.eu/

and give user ‘cessda’ admin rights for it. Thanks.

cessda-bitbucket-importer commented 3 years ago

Original comment by Daniel A. Øien (GitHub: openconcept).


Hi, the website has been added and cessda given admin rights.

Tracking code:

<!-- Matomo -->
<script type="text/javascript">
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//analytics.cessda.eu/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '5']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

cessda-bitbucket-importer commented 3 years ago

Original comment by Carsten Thiel (GitHub: schildwaechter).


Thanks. What happens if this code is included on the test-system docs-dev.tech…? Will that be ignored or mixed together with the rest?

cessda-bitbucket-importer commented 3 years ago

Original comment by Daniel A. Øien (GitHub: openconcept).


I’ve set it to only track the docs.tech.cessda.eu traffic so it should ignore traffic on the test system.

cessda-bitbucket-importer commented 3 years ago

Original comment by Carsten Thiel (GitHub: schildwaechter).


thanks

cessda-bitbucket-importer commented 3 years ago

Original comment by Carsten Thiel (GitHub: schildwaechter).


on second thought, we should include that snippet in the Jekyll theme as a configurable option

cessda-bitbucket-importer commented 3 years ago

Original comment by Daniel A. Øien (GitHub: openconcept).


There is now an option “matomo” in _config.yml that can be set to true or false. Distribution via gem has been dropped, all files related to the theme are here: https://github.com/cessda/cessda.documentation.theme/blob/master/

cessda-bitbucket-importer commented 3 years ago

Original comment by John Shepherdson (GitHub: john-shepherdson).


@schildwaechter FYI no tracking taking place as changes have not been pushed to production yet.

cessda-bitbucket-importer commented 3 years ago

Original comment by Carsten Thiel (GitHub: schildwaechter).


yes, waiting for final release of them gem

cessda-bitbucket-importer commented 3 years ago

Original comment by Carsten Thiel (GitHub: schildwaechter).


Fixed with #39