Need an event to notify that a know visit has happened (Tracker.Visit.knownVisitorInformation) #879
Labels
duplicate
For issues that already existed in our issue tracker and were reported previously.
Enhancement
For new feature suggestions that for example enhance Matomo's cabapilities..
Milestone
It is useful for plugins to be notified when a "know visit" has happened and also be able to gather information about that visit.
Currently, we use the {Tracker.Visit.isExcluded} hook to detect this. The drawback of this is that no other information about the visit is known during this event's propagation. The visitorInfo object is essentially empty at this point. This precludes plugins from making use of numerous useful values such as idvisit, idsite, visit_exit_idaction, etc...
I propose dispatching a {Tracker.Visit.knownVisitorInformation} event from within the {Piwik_Tracker_Visit.handleKnownVisit()} function and passing the visitorInfo var in it. This is very similar to how the {Tracker.newVisitorInformation} event is dispatched.
Code to be added to the end of Piwik_Tracker_Visit.handleKnownVisit():
I've implemented it in my hacked Piwik copy and it works great and is sooo useful to some custom plugins I'm building. Simple one-liner change, but good value I think.
Keywords: tracker event
The text was updated successfully, but these errors were encountered: