API Bulk Tracking - Format?


(habakuk) #1

Hi,

http://developer.piwik.org/api-reference/tracking-api tells me, that the format for the bulk tracking is


{
   "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 bul k page view&rec=1"
   ],
   "token_auth": "33dc3f2536d3025974cccb4b4d2d98f4"
}

On http://stackoverflow.com/a/16361350/254041 I read that the documentation is wrong and the format should be

{
"requests": [
    {
        "apiv": "1",
        "bots": "1",
        "idsite": "1",
        "download": "",
        "cdt": "",
        "dp": "",
        "url": "",
        "urlref": "",
        "cip": "",
        "ua": "",
        "_cvar": {
            "1": [
                "Not-Bot",
                "Mozilla/5.0+(Macintosh;+U;+Intel+Mac+OS+X+10_6_5;+en-US)+AppleWebKit/534.10+(KHTML,+like+Gecko)+Chrome/8.0.552.231+Safari/534.10"
            ]
        },
        "rec": "1"
    }
  ]
}

What’s the right format?

Thanks!
Stefan


(Matthieu Aubry) #2

The format in the doc should be the right one so if you have a problem, let me know here (and not on stackoverflow as we don’t read questions over there)


(habakuk) #3

Ok, It worked for me like descriped on Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3