Visitor Profile is a summary of your visitor, including a list of all their visits. It is possible to export a full visitor profile as JSON or XML. But to export all your visitors profiles data for a particular website, you must implement a small script and use the APIs as explained below.

Steps to export all visitor profiles

This is a two-step process where first, we call an API to collect all “Visitor IDs” for the website, then we loop over the list and for each “Visitor ID” we call the “get visitor profile” api. You need to get in touch with your developers in order to accomplish this.

Please follow the steps below:

  1. Call the API Live.getLastVisitsDetails for a given date range, using &showColumns=visitorId to only return the “Visitor ID” column.
    Here’s an example for your reference:
    https://example.matomo.cloud/?module=API&method=Live.getLastVisitsDetails&idSite=1&period=day&date=yesterday&format=xml&token_auth=anonymous&showColumns=visitorId
    You will receive back the list of visitor ID.

  2. Now, you can call the user profile using API call: Live.getVisitorProfile
    You will have to implement a small script to loop through the Visitor IDs, and for each of them call the Live.getVisitorProfile with the parameter &visitorId=XXXXXXX for example:
    https://demo.matomo.cloud/?module=API&method=Live.getVisitorProfile&idSite=1&format=xml&token_auth=anonymous&visitorId=XXXXX

Note: The visits of the same visitor can be achieved by SQL query only.