@anush opened this Issue on July 25th 2009

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():

Piwik_PostEvent('Tracker.Visit.knownVisitorInformation', $this->visitorInfo);

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

@robocoder commented on July 25th 2009 Contributor

dupes #825

@robocoder commented on July 30th 2009 Contributor

see: Tracker.knownVisitorInformation

This Issue was closed on July 30th 2009
Powered by GitHub Issue Mirror