@dbakker opened this Issue on January 5th 2016

The dev page on the HTTP API does not contain any information about how to add "time on page"/"heartbeat" information to pageviews. (Introduced by the ping=1 query param pull request )

It seems that currently it is possible to use, by issuing 2 requests with a modified cdt:

{
   "requests": [
      "?cdt=2016-01-05+20:10:21&idsite=1&url=http://example.org&action_name=Test bulk log Pageview&rec=1&apiv=1",
      "?cdt=2016-01-05+20:10:51&idsite=1&url=http://example.org&action_name=Test bulk log Pageview&rec=1&apiv=1&ping=1",
   ],
   "token_auth": "33dc3f2536d3025974cccb4b4d2d98f4"
}

I think it would be nice to add an example like this, and in a future version perhaps also consider adding a timeonpage type parameter so requests don't need to be doubled.

@tsteur commented on January 10th 2016 Member

@diosmosis can you maybe document it?

@diosmosis commented on January 11th 2016 Member

If @mattab makes it a priority for me, I will get to it the next time I work on Piwik.

@mattab commented on January 12th 2016 Member

@diosmosis +1 this should take a few minutes only to document our new ping parameter

@mattab commented on April 19th 2018 Member

This was added today

This Issue was closed on April 19th 2018
Powered by GitHub Issue Mirror