Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to customize icon of events per event category #22135

Open
fulstadev opened this issue Apr 17, 2024 · 0 comments
Open

Add possibility to customize icon of events per event category #22135

fulstadev opened this issue Apr 17, 2024 · 0 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member

Comments

@fulstadev
Copy link

It would be great if matomo could offer a way to control the icons displayed in the event view per event category, such that the occurrence of a specific event category type can be quickly identified. To make this possible for the general event view in Dashboard > Dashboard and Visitor > Visitor Log would be really neat.

Summary

I've currently tried to implement that using a custom javascript functionality added via custom plugin / theme on our on-premise instance, on which, what I do, basically is, to reach what I want in the Dashboard > Dashboard View:

  • Scan for all concerned elements using : document.querySelectorAll('img.iconPadding')
  • For each of those, check if their title attribute holds the string error (which is our event category for error events)
  • If yes, replace the value of the src attribute with the link to the error icon in our custom theme / plugin

This works, but the problem is that the entire view under Dashboard > Dashboard is refreshed periodically with every new incoming (polling?) request of the newly incoming events, and this also seems to re-build the entire markup. We've also tried to do as mentioned using stuff like setInterval in JS to repeat the task every x seconds, but it's of course not ideal as the icons keep switching back and fourth. So we wondered if there's not a way to map a specific event icon to an according event category, such that markup generated will be adapted accordingly?

Your Environment

On-Premise Installation

  • Matomo Version: 5.1.0-b1
  • PHP Version: 8.2.18
  • Additionally installed plugins: None
@fulstadev fulstadev added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member
Projects
None yet
Development

No branches or pull requests

1 participant