holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.8k stars 519 forks source link

Embed Plausible analytics code to servable app #7479

Open fmaussion opened 1 week ago

fmaussion commented 1 week ago

Apologies if this has been discussed before. How can we embed a plausible analytics snippet into a panel app served on a bokeh server with app.servable()? We'd need to add some code like below in the header:

<script defer data-domain="domain.org" src="https://plausible.org/js/script.js"></script>
philippjfr commented 1 week ago

Would definitely be nice to integrate this better but can you just add it as a HTML element for now?

pn.pane.HTML('<script defer data-domain="domain.org" src="https://plausible.org/js/script.js"></script>').servable()