I am trying to use Matomos REST-api (https://developer.matomo.org/api-reference/reporting-api) to get user statistics from four specific webpages. To get information about a specific page I use the: Actions.getPageUrl method. I also specify that period should be month, and date should be last month (I intend to run the script continuously every month - getting last months statistics).
This seems to be working fine, but I am getting a bunch of data that I am not interested in, and some of the data that I want is missing in the response.
The response I get contains the following fields:
I am only interested in:
and I want to split up the data somehow to show “browserCode” and “countryCode” - if possible.
I’m not sure how that would work in reality. Maybe splitting on just “browserCode” to begin with is good enough. For instance, I make the request and the response contains a bunch of JSON-arrays (one for each browserCode) with data such as:
-The users in this array used the Google Chrome browser
-Number of visits: 32
-URL: x (same as below)
-The users in this array used the Internet Explorer browser
-Number of visits: 2
-URL: x (same as above)
Is this possible, and if so: how?
Thanks in advance.