diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 7b150d6..5abdc3f 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -54,6 +54,11 @@ const config: Config = { '/js/crisp.js', async: false, }, + { + src: + '/js/matomo.js', + async: true, + }, ], themeConfig: { diff --git a/static/js/matomo.js b/static/js/matomo.js new file mode 100644 index 0000000..eab1a23 --- /dev/null +++ b/static/js/matomo.js @@ -0,0 +1,29 @@ +/* Matomo Tag Manager */ + + var _mtm = window._mtm = window._mtm || []; + _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); + (function() { + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src='https://analytics.threefold.io/js/container_47J8h6pI.js'; s.parentNode.insertBefore(g,s); + })(); + +/* End Matomo Tag Manager */ + + + + +/* Matomo */ + + 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.threefold.io/"; + _paq.push(['setTrackerUrl', u+'matomo.php']); + _paq.push(['setSiteId', '20']); + 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); + })(); + +/* End Matomo Code */