RealOrangeOne / django-plausible

Django module to provide easy Plausible integration, with Wagtail support
https://pypi.org/project/django-plausible/
BSD 3-Clause "New" or "Revised" License
16 stars 2 forks source link

feature stats in wagtail admin #5

Open onno-timmerman opened 1 year ago

onno-timmerman commented 1 year ago

It would be realy nice to add feature so you can see some stats in the admin. Example how many page visits etc... That would be a great boost to use Plausible.

RealOrangeOne commented 1 year ago

Interesting idea. Are you thinking like a deep integration with the stats API or just an embed

onno-timmerman commented 1 year ago

Would be great to have some stats API. When the admin sees his page he could click on tab "STATS" and see some metrics about that page. On dashboard it would be great to have general overview. I'm using Plausible for all website's and these are with Wagtail.

joshuadavidthomas commented 2 months ago

If you'd be interested in a patch, I have extended this package in my Wagtail CMS project and added the embedded dashboard provided by Plausible - https://plausible.io/docs/embed-dashboard.

onno-timmerman commented 2 months ago

Great: I was yesterday again thinking about it ( no time offcourse ) but if would be nice to have some stats on a page if you edit a page for example and then click in Wagtail the (i) on the left top. One of those small components could be some stats on that particular page. but maybe this is kinda to much

joshuadavidthomas commented 2 months ago

Great: I was yesterday again thinking about it ( no time offcourse ) but if would be nice to have some stats on a page if you edit a page for example and then click in Wagtail the (i) on the left top. One of those small components could be some stats on that particular page. but maybe this is kinda to much

Totally! That's my long term goal with my project (and if @RealOrangeOne is interested in me upstreaming it, of course).

But as a stop-gap, I'm literally just embedding the Plausible dashboard in a custom admin view:

image

(Side note: I don't know why I pixelated the stats just now -- maybe I'm a bit embarassed by the relatively low numbers 😅)

RealOrangeOne commented 2 months ago

I'd absolutely welcome that as a change! Looks great!

As full dashboards go, there's no point duplicating Plausible's charts. Embedding in the page editor might warrant custom ones, but for this embedding the Plausible dashboard definitely feels like the right way to go.