-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Description
This is going to be a bit technical: So far, when a ping request is sent, the request processor unsets other actions to prevent them from being created here: https://github.com/piwik/piwik/blob/2.16.0-b6/plugins/Heartbeat/Tracker/PingRequestProcessor.php#L24-L29
However, the visit itself is still updated. This has many downsides and risks:
- We don't really know what a ping request is actually supposed to do (updating visit_total_time)
- A ping request will update any kind of visit fields unless we work around it like this https://github.com/piwik/piwik/pull/9617/files#diff-73996192b2fb6075808b45d6276c3264R54 in each individual dimension. This can cause many side effects like total time of visit is not the sum of times of page visits #9610
- Other plugins cannot know whether a ping request is happening so on any ping request they might still write data. This is a bit hard to explain but it might cause already bugs. Eg in the code the
PingRequestProcessor
unsets anAction
metadata so no entry inlog_link_visit_action
gets created. It does this also for some Goals metadata etc. However if we change somewhere something in the code and forget to update the ping processor, we will introduce new bugs. This might be already the case for any 3rd party plugins including the ones from Piwik PRO. - The API gets simpler as one only has to send something like
&idSite=5&ping=1
(There's a chance it works already like this right now)
In general, the ping request processor should simply update visit_total_time
and that's it. The ping request processor will only cause no bugs and side effects if it has no knowledge of any other plugins. With the current implementation, it has to know everything about all dimensions. This makes it a problem for Piwik PRO and 3rd party plugins but also when we change or add code.
Metadata
Metadata
Assignees
Labels
EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.