matomo

Matomo's Live API not respecting date


When I use Matomo's Live API for getting the user's profile with getVisitorProfile(), the passed in date is ignored.

curl  -N  -i -X POST -d 'token_auth=xxxlanguage=en&format=json&module=API&method=Live.getVisitorProfile&idSite=1&date=yesterday&period=day&segment=eventCategory==MediaVideo&visitorId=xxx' https://myurl.matomo.cloud/index.php

Triggering this command I get all last visits and not the requested time period. Is it a bug or meant to be? If it is intentionally, what would be the right query or method?


Solution

  • The Live.getVisitorProfile in the Matomo Reporting API does not have an option for date, the only options it accepts are idSite, visitorId = '', segment = '', limitVisits = ''

    You can see what options are available for the Live API in the Reporting API Reference docs here: https://developer.matomo.org/api-reference/reporting-api#Live