@@ -86,8 +86,7 @@ const config = {
8686 editUrl : `${ repoUrl } /edit/${ branch } /website/` ,
8787 editLocalizedFiles : true ,
8888 } ,
89- ] ,
90- 'docusaurus-plugin-matomo'
89+ ]
9190 ] ,
9291 themeConfig : ( {
9392 image : 'img/logo.svg' ,
@@ -198,16 +197,31 @@ const config = {
198197 theme : prismThemes . github ,
199198 darkTheme : prismThemes . oneDark ,
200199 additionalLanguages : [ 'java' , 'bash' ]
201- } ,
202- matomo : {
203- matomoUrl : 'https://analytics.apache.org/' ,
204- siteId : '83' ,
205- phpLoader : 'matomo.php' ,
206- jsLoader : 'matomo.js' ,
207200 }
208201 } ) ,
209202 themes : [ '@docusaurus/theme-mermaid' ] ,
210- headTags : [ ] ,
203+ headTags : [
204+ {
205+ tagName : 'script' ,
206+ attributes : {
207+ type : 'text/javascript' ,
208+ } ,
209+ innerHTML : `
210+ var _paq = window._paq = window._paq || [];
211+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
212+ _paq.push(["disableCookies"]);
213+ _paq.push(['trackPageView']);
214+ _paq.push(['enableLinkTracking']);
215+ (function() {
216+ var u="https://analytics.apache.org/";
217+ _paq.push(['setTrackerUrl', u+'matomo.php']);
218+ _paq.push(['setSiteId', '83']);
219+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
220+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
221+ })();
222+ ` ,
223+ } ,
224+ ] ,
211225 markdown : {
212226 format : 'md' ,
213227 mermaid : true ,
0 commit comments