I’m trying to add plausible.io for user/usage analytics (I know dhis2 has a built in analytics but not fitting end user needs)
I noticed that keyCustomJs doesn’t seem injected in the dashboard on newer dhis2.
after several trial (clearing cache,…) I still don’t see the snippet executed.
Do you confirm the new pages/dashboard apps still allow that ?
A quick search doesn’t show usage of it Code search results · GitHub
If it’s no more supported what is the recommended way of doing that kind of things ?
(I’d like to avoid nginx filtering)
I’m not familiar with the plugins. I read that most of the code is isolated in an iframe so not sure it would allow an analytics script to “listen” to user activity. And Would have thought the plugins are a bit lazily launched, only if a custom component is present in the configuration.
nginx it would endup substituing a bit blindly, my fear would be to match a tag in responses we are not supposed to touch, and breaking Accept-Encoding forward looks bad too.
You’re absolutely right. It would have missed the point.
It’s great that you are cautious and I’d recommend to keep it that way for now until it’s well tested in a development instance. Did you try that configuration with the sub_filter_types? Does plausible also track activity within the apps?
Thanks for sharing!
Aside from the “Usage Analytics app”, this still seems to be an idea being explored:
seem to return dashboard names, but not per week, only since the “beginning”
So I guess I need to do that last query every week and substract from previous week counts ?
or is there another param/endpoint that could help ?
I tried via an sqlView but not sure if it’s ok/futur proof
select
d.uid as dashboard_uid,
d.name as dashboard_name,
count(\*) as views
from datastatisticsevent dse
join dashboard d on d.uid = dse.favoriteuid
where dse.eventtype = 'DASHBOARD_VIEW'
and dse.timestamp >= '${startDate}'
and dse.timestamp < '${endDate}'
group by d.uid, d.name
order by views desc;