diff --git a/docs/_static/js/matomo.js b/docs/_static/js/matomo.js new file mode 100644 index 0000000000..4f81be9062 --- /dev/null +++ b/docs/_static/js/matomo.js @@ -0,0 +1,11 @@ +var _paq = window._paq || []; +/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ +_paq.push(['trackPageView']); +_paq.push(['enableLinkTracking']); +(function() { + var u="https://matomo.ethereum.org/piwik/"; + _paq.push(['setTrackerUrl', u+'matomo.php']); + _paq.push(['setSiteId', '18']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); +})(); \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 1aaf119408..a2b590a92a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -149,7 +149,10 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] +html_static_path = ['_static'] + +def setup(app): + app.add_js_file("js/matomo.js") # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied