@tsteur opened this Issue on June 25th 2015 Owner

Recently we implemented new tracker feature ping=1 in https://github.com/piwik/piwik/pull/8069 .

While reading https://github.com/piwik/piwik/issues/8202 I noticed there might be a problem with the implementation of ping request during tracking. Problem might be in Visit.php here: https://github.com/piwik/piwik/pull/8069/files#diff-9bca48e482124d44a3d910acc809194eR168

Imagine a ping request is sent and a new visit is detected. This can happen for many reasons, eg it is now after midnight, no ping was sent for last 15 minutes and user configured a shorter "timeout", a custom dimensions causes a new visit etc.

In this case we might track the same action again as it never goes in if !$isNewVisit. It is a new visit and therefore we create a new visit including action etc for this ping request but I reckon it should not?

A solution could be to do something like

if ($this->isPingRequest() && $isNewVisit) {
   return; // do not track anything?
} else if ($this->isPingRequest() && !$isNewVisit) {
  $action= null;
}

I'm not sure about expected behaviour in this case and wasn't sure if I should comment on already merged PR or not. So created this issue. Feel free to close if it is invalid

@mattab @diosmosis

@mattab commented on June 26th 2015 Owner

It is a new visit and therefore we create a new visit including action etc for this ping request but I reckon it should not?

After thinking about it, it's a good point.

  • it is not desired to create new visit with "unknown action".
  • we should ignore ping requests that would otherwise create these new visits with unknown action.
  • note to self: check whether goal conversions/ecommerce could be double counted.
    • Edit: looks OK and no double counting should be possible

I'll work on this one

@mattab commented on June 26th 2015 Owner

fixed in #8223

This Issue was closed on June 26th 2015
Powered by GitHub Issue Mirror