Include Plausible Analytics

I am interested in including Analytics in my Jitsi instance.
I don’t like Google Analytics though and I personally use “Plausible” analytics that I self-host as well.

Plausible works by using a javascript that is normally included in the tag and I have no idea how to make it work with Jitsi.

This is the script:

<script async defer data-domain="jitsi.my.domain" src="https://analytics.jmy.domain/js/plausible.js"></script>

I tried including it in the web config.js under analytics.scriptURLs but that doesn’t include the data-domain part that Plausible need to know, which domain to track the visit for.

Can anyone point me in the right direction how I could go about integrating this with Jitsi (I’m using Jitsi in Docker btw.)?

Thanks in advance!

1 Like

In my opinion google analytics is best for this. But i think you are not using it correctly. Just embedding analytics tracking won’t help much for applications. You need to deep dive into custom dimensions , metrics and events to get the best out of it.

Thanks for the insight.

My only goal is to get a rough insights into how many people access my Jitsi instance. I don’t need to know how long they stay, what they do or anything like else.

Plausible can normally tell me how many people access my site for each different /endpoint.
As Jitsi uses different endpoints for different rooms, I would assume that that would work with Plausible, which would already be more than enough functionality.

I just want to know it is possible to include the JavaScript in a way that it is used on each Jitsi page and I‘ll be happy. If that is not possible, I‘ll just scratch the idea.

Put your script in this file on your deployment jitsi-meet/head.html at master · jitsi/jitsi-meet · GitHub
You should have this file and it should be empty.

That is exactly what I needed!

It is working as I wanted it to.
Thank you very much! :slight_smile:

And here is an example of how to do this in Docker. Simply create a custom overlay on top of the upstream container. Also double check your content security in Nginx if you use that as a reverse proxy. The developer console in Firefox/Chrome helps to troubleshoot this.