I noticed a problem on Moodle 3.9.5, I have a course with feedback. Student visiting or submitting this feedback produce anonymous event in logs.
As of https://tracker.moodle.org/browse/MDL-66213 it is now possible to see this events with the capability viewanonymousevents.
The problem is that the "Hits on course" graph ignore this capability and always hide anonymous event.
I'm quite new with php and not comfortable to edit correctly the code but the change would be needed in: