Aam-Digital / ndb-core

Easy-to-use case management web app for NGOs anywhere in the world.
http://www.aam-digital.com
GNU General Public License v3.0
55 stars 18 forks source link

Prevent some user account actions to appear in matomo #1675

Open TheSlimvReal opened 1 year ago

TheSlimvReal commented 1 year ago

In order to further improve our monitoring system, it would be great if we can exclude certain user accounts from being logged to matomo. This could be done through a certain flag on the user account and a filter in the matomo analytics website.

sleidig commented 12 months ago

Suggested approach:

Add another attribute, "disableUsageAnalytics = true", to Keycloak accounts (similar to how we use "exact_username" to map to the correct User entity). Upon authentication in the app, trigger a call to the AnalyticsService to disable itself in case that flag is set.

@TheSlimvReal are Keycloak attributes passed along to the Angular client automatically or would this need a mapping in our backend?

TheSlimvReal commented 11 months ago

@sleidig The property would probably need to be mapped to JWT token claims. This can be configured in keycloak on a per-realm basis.