I am currently working on retrieving and utilizing event data from Matomo using its REST API. I send GET requests to fetch the data in JSON format and want to apply specific filters to refine the results. For example, I want to retrieve all event names for each day over the last seven days.
However, I have encountered issues when using segments for filtering. For example, when I try to get all event names filtered by a category (e.g., “audio”), the results are inconsistent. On some days, I receive event names associated with a different category (e.g., “video”), and on other days, I get no event names at all—even though I know events with the “audio” category were recorded on that day.
What could be causing this issue? Is there a solution to ensure accurate filtering? Additionally, is there a better approach to filtering event names, categories, and actions together?
Here’s an example of the parameters how I request the data:
&module=API&format=json&idSite=1&method=Events.getName&period=day&date=last7&segment=eventCategory%3D%3Daudio
Any insights or recommendations would be greatly appreciated!