Closed kristopherjohnson closed 10 years ago
We have fixed a bug in the bulk import and it's likely this could have created a bug in the iOS SDK bulk import. @mattiaslevin changing iOS to follow bulk API format should work. http://developer.piwik.org/api-reference/tracking-api#bulk-tracking let me know if you need more info to make iOS SDK
It looks like the bulk request changed the encoding of the request body to non url encoding (which is probably the correct thing in the first place).
I will make a fix and new release as soon as I have tested.
Fixed.
Piwik 2.0 require the JSON request body to be non-url encoded, this is now the default behaviour in the tracker.
If you are connecting to a Piwik 1.X server the request body should be url encoded. You can enable legacy encoding by defining the following marco in the .pch file in your project.
#define PIWIK1_X_BULK_ENCODING
Look in the iOS demo project for an example.
I will do some more testing then a new release and update the pod. The README file will be update with information how to select the correct encoding depending on server.
Thanks a bunch for pointing this out.
I upgraded my Piwik server to version 2.0 today, and now attempts to use the bulk import API result in a 500 response from the server.
I'll try to get more details when I have time, but for now I am just forcing the number of events per request to be 1 so that the non-bulk API is used.