Skip to content

Document heartbeat/"time on page" information for the HTTP Tracking API #9477

@dbakker

Description

@dbakker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: Website matomo.orgFor issues related to our matomo.org website.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions