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

Data bleeding over in bulk inserting with custom variables #7217

Closed
iquito opened this issue Feb 16, 2015 · 2 comments
Closed

Data bleeding over in bulk inserting with custom variables #7217

iquito opened this issue Feb 16, 2015 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@iquito
Copy link

iquito commented Feb 16, 2015

I already reported this issue last summer (unfortunately I cannot find a link to it) and it was supposedly fixed - when doing bulk inserts of many records, the data given to Piwik is not reset after every visit entry for custom variables with scope "visit". I tested it again with the newest release just now, and the same bug still exists:

In my case, I am inserting 1000 page visits at a time. As soon as a custom variable with scope "visit" is set, all further visits seem to be added to this first visit, even though I am setting an explicit visitor ID (via setVisitorId in PiwikTracker class) for every entry.

This leads to HUGE visitor log entries - suddenly one visitor seems to have visited 500 pages and made 4 purchases within his journey (which would be great, if anyone would ever do that).

Currently, to circumvent this problem, every time a custom variable with "visitor" scope is set I issue a $t->doBulkTrack(); and start again. Unfortunately, this is not very efficient - instead of 1000 entries at a time, there are many requests with a small number of inserts. So a fix would be greatly appreciated.

@mattab
Copy link
Member

mattab commented Feb 19, 2015

Hi there, did you upgrade the PHP client to latest version? it should work thanks to this code here: https://github.com/piwik/piwik-php-tracker/blob/master/PiwikTracker.php#L1310-1312

if it doesn't with the latest version of the Piwik Tracking PHP client please reopen, and if possible post a script to reproduce the issue.

@mattab mattab closed this as completed Feb 19, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Feb 19, 2015
@iquito
Copy link
Author

iquito commented Feb 19, 2015

Yes I used the latest version, and it contains the code you mentioned - I just checked it. This problem still occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants