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 Nr. 2 #7245
Comments
you will need to call clearCustomVariables() in your script to clear the custom variables between visits. As far as I see it works as expected. if you think i'm wrong please post script that reproduces and shows the problem. thanks |
This does not really make sense to me, even though I have spent hours and hours with Piwik to customize it - when I insert log entries in bulk and set a custom variable with scope "visit", this does not mean every following entry should have that variable too, I only want to communicate to Piwik that this variable should be set to the whole "visit" of this user and not only one page. So when calling Additionally, all the pages after setting the custom variable are combined into one huge visit, even though I set a visitor ID for every page - this seems clearly wrong, just setting one custom variable with scope "visit" should not provoke Piwik to combine all different visits into one, because a custom variable of scope "visit" is not a "unique" column or has any indication about which entries belong together. |
Ok there may be an issue here...
I assume that you call |
Yes, that's exactly what I do - "visit"-custom-variables still cause the problems I mentioned. I always thought the problem was within the API, not within the PiwikTracker-class, and that bulk tracking within the API maybe has some bug which causes this - because bulk tracking is probably used far less than the other methods (Javascript, 1-pixel-script) and it only occurs with visit-custom-variables, which is even more specific, so not many users actually witness this bug (or it occurs and they do not notice it - it is only really noticeable with large enough inserts). Unfortunately I am not familiar with the Piwik code with the exception of the PiwikTracker class - but if you can point me in the direction where bulk requests are handled within the Piwik code, I will try to find the problem ;-) |
it's possible the bug is in the bulkTracking but somehow I don't think so - this should work fine. Can you therefore check that the payload sent from the piwikTracker class is correct? if you can confirm it is correct, can you paste here this correct payload that then records wrong values in the Tracking API? we could use it to reproduce the bug. thanks |
I just started to add a second Piwik installation so I have a testing environment without affecting my actual statistics, but when trying to verify the data with via web interface I ran into this bug: #6189 - which seems to make it impossible to run two seperate piwik installations within one server, because I have the same fatal errors as in the bug. If I cannot run two distinct Piwik installations, it makes it impossible to test, otherwise I gladly will provide the data & test some more. |
see #6189 (comment) |
The problems in #7217 still occur - I do not think the code mentioned changes anything. When doing bulk requests the
sendRequest
function is only called at the very end (to send all entries at once), so resetting the custom variables there would not change anything, as far as I see it.I do not know where exactly the problem occurs - just that the bulk inserts get mangled together as soon as a custom variable with scope "visit" is set.
The text was updated successfully, but these errors were encountered: