@dropadrop wrote:
I've been testing using Piwik with the tracking API to work around custom data that I receive offline and need to process for further use. It has been fine while doing separate calls for each request, but I'm wondering if the intended use for bulk tracking is completely different from what I'm doing.
For each request I have a number of variables including cdt and cip which require token_auth. As per the instructions on the site I wrapped 5 requests into one "batch" and included token_auth as a separate parameter (it was also included in each query string in the batch). This resulted in nothing being added to the DB and also warnings that CDT requires token_auth.
DEBUG Piwik\Common[2016-11-01 13:22:37] [a8755] Custom timestamp is 2717878 seconds old, requires &token_auth...
DEBUG Piwik\Common[2016-11-01 13:22:37] [a8755] WARN: Tracker API 'cdt' was used with invalid token_authSo I modified it so that token_auth is only set in the JSON request and not in the individual calls, but after this I receive HTTP status 400 for each request with quite a lot of errors:
DEBUG Piwik\Common[2016-11-01 13:22:37] [a8755] array (
DEBUG Piwik\Common[2016-11-01 13:22:37] [a8755] '{"requests":_"idsite' => '10',
...
DEBUG CoreHome[2016-11-01 13:22:37] [a8755] WARN: Tracker API 'cip' was used with invalid token_auth
...
DEBUG Piwik\Common[2016-11-01 13:22:37] [a8755] Exception: Invalid idSite: '0'So apart from still not allowing variables that require token_auth, it seem's to be confused about what site the request was for (even though it managed to parse it earlier).
Is there something I'm not getting? One notice, I'm using GET requests rather then POST, but it seems to be at least getting the payload and managing to handle each row individually just not liking the data it see's...
Posts: 4
Participants: 2