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

Need an event to notify that a know visit has happened (Tracker.Visit.knownVisitorInformation) #879

Closed
anush opened this issue Jul 25, 2009 · 2 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@anush
Copy link

anush commented Jul 25, 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
Copy link
Contributor

dupes #825

@robocoder
Copy link
Contributor

see: Tracker.knownVisitorInformation

@anush anush added this to the Piwik 0.4.3 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants