Issue with API Integration for Website Analytics on Piwik PRO

I’ve been encountering a challenge with integrating my website’s analytics data using the Piwik PRO API. I’ve followed the documentation closely and have successfully set up the integration, but I’m not seeing the expected results.

Specifically, I’m trying to retrieve data such as page views, unique visitors, and referral sources programmatically using the API endpoints provided by Piwik PRO. However, when I make the API requests, I’m either getting incomplete data or encountering errors.

I’ve double-checked my authentication credentials, endpoint URLs, and parameters, but I’m still unable to retrieve accurate analytics data through the API.

Has anyone else experienced similar issues with API integration on Piwik PRO? Are there any common pitfalls or troubleshooting steps I might be overlooking? Any advice or guidance on how to effectively utilize the API for website analytics would be greatly appreciated. Thank you!

Hi @joeroot,

A lot of questions there…
Could you be more precise on what you try to accomplish here?

Whenever I need a dataset, I usually create a custom report, that has all the required columns in it.
After creating it, I use the API description as seen in UI.

Are you trying to grab raw data, or processed data?
If you try to grab processed data, what dimensions and metrics (columns) are you looking for. How many rows would you expect from these queries? over 100? use the limit parameter (the default number of rows returned is 100)

Would that help?

Thank you for your response and willingness to assist.

To provide more clarity on my objectives, I am attempting to retrieve both raw and processed data from Piwik PRO via the API. Specifically, I am interested in obtaining metrics such as page views, unique visitors, and referral sources for various time intervals (e.g., daily, weekly, monthly) programmatically.

For raw data, I aim to access detailed information on individual visits, including visitor IP addresses, user agents, and timestamps.

As for processed data, I am primarily interested in aggregated statistics grouped by dimensions such as page URLs, referral sources, and visitor characteristics.

I appreciate your suggestion regarding custom reports. I will explore this option further and leverage the API descriptions available in the UI to construct the necessary API requests.

Regarding the dimensions and metrics I am looking for, here is a breakdown:


  • Page URL
  • Referral source
  • Visitor IP address
  • User agent


  • Page views
  • Unique visitors

I anticipate retrieving data for multiple pages and referral sources, which could result in more than 100 rows per query. Therefore, I will utilize the limit parameter as suggested.

Thank you for your assistance. If you have any additional recommendations or insights on how to effectively utilize the API for my requirements, please feel free to share them. :blush: :grinning: