Bulk tracking HTTP syntax problem

I am hard time getting bulk tracking over HTTP, posting to piwik.php, to work. I just take 3 of my regular requests (that work fine by themselves) and create a string using the syntax described at Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3, and them POST it to piwik.php:


I substituted the real url for MYURL in the above example.

This is how I understand it should be constructed. When I try it in a browser (normally I send it from desktop app), it takes me to All Websites Dashboard, with no effect on the stats. I get no errors from debug.

I also tried it with “?” after piwik.php - same result.

I’m sure it’s something silly. Any ideas?

Thank you.

You need to send a POST request, and the JSON data needs to be the body of the request. In your example you put it in the URL, which doesn’t work.

Here is an example using curl (taken from the documentation):

curl -i -X POST -d '{"requests":["?idsite=1&url=http://example.org&action_name=Test bulk log Pageview&rec=1","?idsite=1&url=http://example.net/test.htm&action_name=Another bulk page view&rec=1"]}' http://piwik.example.com/piwik.php

So in your exampel you need to send this data as the POST body (either with curl or with whatever other tool):


OK, that makes sense, I missed that part.

I am doing it from Xojo. I set everything that is in the curly brackets as a payload of my POST request, sent it to http://MYURL/piwik.php, and after I also removed the extra comma from the end of my string before the right curly bracket, it worked!!

Thanks a million!!