Hi Guys,
I run a bokeh app behind a bokeh server and want to integrate now Matomo with the following script tag:
<!-- Matomo -->
<script type="text/javascript">
console.log("I'm fireing!")
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//someurl/matomo/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '123']);
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+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
Unfortunately I don’t know how to do it.
So far I tried:
- using a div widget with the javascript code but it seems like this is really only possible for markups
- creating an index.html file included the script aforementioned script tag in the app dir in a templates folder. Since bokeh server is part of another 3rd Party App here, I can now at no means change the startup command to include --show
I’m running out of ideas. Any help is higly appreciated.
Best,
Alex

