Skip to content

Commit

Permalink
chore(docs): add custom javascript
Browse files Browse the repository at this point in the history
Add web analytics custom javascript
  • Loading branch information
dfranco committed Dec 31, 2023
1 parent ade60be commit 42eaf66
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/source/_static/js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://baculaweb.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='//cdn.matomo.cloud/baculaweb.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_js_files = [
'js/custom.js',
]

# -- Options for HTMLHelp output ------------------------------------------

Expand Down

0 comments on commit 42eaf66

Please sign in to comment.