Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add analytics to the bokeh apps #195

Open
7 tasks
fmaussion opened this issue Sep 12, 2024 · 3 comments
Open
7 tasks

Add analytics to the bokeh apps #195

fmaussion opened this issue Sep 12, 2024 · 3 comments
Assignees

Comments

@fmaussion
Copy link
Member

fmaussion commented Sep 12, 2024

Each of the bokeh apps should add the following html snippet to their header. There is probably a way to do it in panel before or during html export, but worst case a quick python postprcessing script could open the html file and add the line just before the </head> tag.

<script defer data-domain="bokeh.oggm.org" src="https://plausible.oggm.org/js/script.js"></script>

While we are at it, it would be good to update them to newer versions of bokeh / panel and see if it still works, and I would be thankful for the Bristol logo 🙈 :

  • Add analytics
  • Update Bokeh
  • Add Bristol logo
  • Glacier explorer
  • Glacier simulator
  • Mass balance simulator
  • (glacier gallery -> need edu.oggm.org analytics)

@pat-schmitt when you have some time to spare... (not super urgent)

@TimoRoth
Copy link
Member

I don't think there is an html file, the pages are generated on the fly, and also completely generated via JavaScript on the fly.
There is practically no hard written HTML anywhere, so this is actually rather complicated.
A quick google also shows no native way to just add a script tag, but only one to directly execute JavaScript, which isn't suitable to add a script like this.

@fmaussion
Copy link
Member Author

Ah yes I forgot that we serve apps like this... In the notebook there is the possibility to export to html, but we do this differently...

@fmaussion
Copy link
Member Author

There is this: https://discourse.bokeh.org/t/how-to-integrate-matomo-something-like-google-analytics/6369/7

But it looks a bit complicated indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants