You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
When doing bulk tracking through the PHP Tracking API (using PiwikTracker.php) I noticed that as soon as I set a custom variable for a visit, this custom variable "bleeds over" to all other visits which are processed afterwards in the same bulk request.
As far as I can tell, when calling "$t->doTrackPageView", "$t->doTrackEcommerceOrder" or any other function which finalizes the processing of one page, all custom variables data should be reset. This seems to work for scope "page", but for scope "visit" all other page requests inherit the custom variables which were set until now.
This can easily be reproduced - just set a custom variable with scope "visit" in the first request being processed when using "$t->enableBulkTracking()" and the PiwikTracker class, and then process completely different visits (with different IPs, visitor IDs, etc.) without setting the custom variable again. Then call "$t->doBulkTrack()" - the custom variable will be shown in any visits which were processed.
The text was updated successfully, but these errors were encountered:
In dbd8960: Fixes #5291 Reset the object properties, when issuing a bulk request
to avoid leaking values from one visitor request to the next (who could be completely different visitor)
Wouldn't it be possible to call clearCustomVariables automatically after each page is processed? This would only be necessary if bulk tracking is enabled, and I think it would always make sense - bulk tracking is by definition used to import many page views at once, and usually this entails different visits and users.
I just think it would avoid a possible pitfall for anybody implementing bulk tracking, then adding custom variables at some stage, but forgetting to also clear the custom variables for each page view.
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
When doing bulk tracking through the PHP Tracking API (using PiwikTracker.php) I noticed that as soon as I set a custom variable for a visit, this custom variable "bleeds over" to all other visits which are processed afterwards in the same bulk request.
As far as I can tell, when calling "$t->doTrackPageView", "$t->doTrackEcommerceOrder" or any other function which finalizes the processing of one page, all custom variables data should be reset. This seems to work for scope "page", but for scope "visit" all other page requests inherit the custom variables which were set until now.
This can easily be reproduced - just set a custom variable with scope "visit" in the first request being processed when using "$t->enableBulkTracking()" and the PiwikTracker class, and then process completely different visits (with different IPs, visitor IDs, etc.) without setting the custom variable again. Then call "$t->doBulkTrack()" - the custom variable will be shown in any visits which were processed.
The text was updated successfully, but these errors were encountered: