diff --git a/docs/configuration.md b/docs/configuration.md index 6e9f9fb56..6a8068ada 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -34,6 +34,7 @@ This part of the configuration concerns anything that can affect the whole site. - `{ provider: 'tinylytics', siteId: '' }`: use [Tinylytics](https://tinylytics.app/); - `{ provider: 'cabin' }` or `{ provider: 'cabin', host: 'https://cabin.example.com' }` (custom domain): use [Cabin](https://withcabin.com); - `{provider: 'clarity', projectId: ' { + _paq.push(['setCustomUrl', location.pathname]); + _paq.push(['setDocumentTitle', document.title]); + _paq.push(['trackPageView']); + }); + + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + (function() { + const u="//${cfg.analytics.host}/"; + _paq.push(['setTrackerUrl', u+'matomo.php']); + _paq.push(['setSiteId', ${cfg.analytics.siteId}]); + const 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); + })(); + \` + document.head.appendChild(matomoScript); + `) } if (cfg.enableSPA) {