Matomo ExecModule
Overview
MatomoModule reads daily visit totals and page traffic from the Matomo Cloud Reporting API. Use the visit summary to populate a daily scorecard or flag a change in site activity. Use the page report to show which pages received traffic on that date. Each request reads one site and one date in the site's configured timezone.
Usage
- In Matomo Cloud, find your tenant label and the numeric ID of the website you want to report on. For
example.matomo.cloud, the tenant label isexample. - Create a Reporting API token with View access to that site. Enable Only allow secure requests when creating the token.
- Choose Matomo Cloud in the Integration Account Console. Save the tenant label as Matomo Cloud Instance and the token as Matomo Auth Token.
- Add a Matomo Cloud step in Workflow Studio and select the saved connection under General > Connection. Choose an operation and supply the site ID and date.
- Check the result's
statusbefore using the metrics or rows in another step.
Inputs
| Input | Type | Purpose |
|---|---|---|
operation | string | visits_summary (default) or page_urls. |
siteId | integer | Required numeric ID of the Matomo website, from 1 to 2,147,483,647. The selected connection must have View access to that site. |
date | string | Required site-local reporting date in YYYY-MM-DD format. |
pageSize | integer | For page_urls, maximum rows per request. Defaults to 50 and accepts 1–100. |
offset | integer | For page_urls, zero-based row offset. Defaults to 0 and accepts 0–10,000. |
Outputs
| Output | Type | Meaning |
|---|---|---|
status | string | success or error. |
httpStatus | integer | Provider HTTP status when available. |
attempts | integer | Number of provider request attempts. |
error | object | On failure, sanitized details and whether a later retry may help. |
summary | object | Daily visits, plus uniqueVisitors, actions, and bounceRate when available. |
rows | array | Page report rows with a label and pageviews, plus visits and uniqueVisitors when available. |
count | integer | Number of rows returned by page_urls. |
nextOffset | integer | Candidate offset for the next page when the response fills the requested page size and the next offset stays within the supported bounds. |
Matomo can omit some metrics. The step emits available metrics as numbers and leaves missing metrics absent. The bounce rate is a ratio, so 0.42 represents 42%. A page label may be a path such as /pricing. The connector redacts recognized credentials from labels.
IntegrationAccount Requirements
Use an authorized, saved READY IntegrationAccount with account name MATOMO. The connection stores the tenant label in accountId and the Matomo token in the protected apiKey field. The connector declares stats:read in Workflow Studio. In Matomo, grant View access only to the sites you intend to query. Where Matomo supports token-level permissions, choose View when creating the token. Where tokens inherit user permissions, use a dedicated account with View access to the selected sites. Matomo token setup
Configuration
Allow the selected tenant's <cloudSite>.matomo.cloud hostname in the workflow's outbound network policy. The connector accepts one DNS label for the tenant and constructs the HTTPS endpoint itself. It rejects redirects and sends token_auth only in the form body. Keep the token in the saved connection and out of workflow inputs.
Operations
- Visits Summary calls
VisitsSummary.getto read site-level visits, unique visitors, actions, and bounce rate where available. Matomo's action total includes activity such as page views, downloads, and outlink clicks. Use the page report when you need page views for individual pages. - Page URLs calls
Actions.getPageUrlsto read a flat page report. Rows provide page labels and their traffic counts in Matomo’s report order. A workflow can fetch additional bounded pages using the returned offset.
Errors and Failure Modes
| Condition | What to check |
|---|---|
| Input validation failure | Check the operation, numeric site ID, reporting date, and page size or offset. |
| Missing or unready connection | Select a ready Matomo connection with the correct tenant label and protected token. |
| Outbound request blocked | Check the cloud tenant label and allowed destination in the workflow network policy. |
| HTTP 401 or 403 | Check the token's validity and View access for the numeric site ID. |
| HTTP 429 | Space out requests from workflows that share the Matomo connection. |
MATOMO_REPORT_ERROR | Matomo returned a report error. Verify the site, date, and access to the report. |
INVALID_PROVIDER_RESPONSE or RESPONSE_TOO_LARGE | For page reports, lower the page size. Check whether the selected tenant is reachable and serving JSON reports. |
Each attempt has a 20-second timeout and a 2 MiB response limit. The connector can retry once after eligible transient failures. It honors a provider Retry-After delay of up to five seconds. If Matomo requests a longer delay, schedule the report for later. Error results omit raw provider responses and credentials.
Example
A site team includes a page breakdown in a daily launch report. It selects the saved Matomo Cloud connection and requests the first five rows for the site's launch day.
{
"operation": "page_urls",
"siteId": 7,
"date": "2026-11-04",
"pageSize": 5,
"offset": 0
}
If Matomo returns two rows, the workflow could receive this result.
{
"status": "success",
"rows": [
{"label": "/launch", "pageviews": 328, "visits": 215, "uniqueVisitors": 194},
{"label": "/pricing", "pageviews": 127, "visits": 86, "uniqueVisitors": 78}
],
"count": 2,
"httpStatus": 200,
"attempts": 1
}
The next step can add these page rows to a report. To add a site-wide visit count, run visits_summary for the same date and site. A visit can include multiple pages, so adding visits across page rows can count the same visit more than once.
Notes
- Pagination. Each
page_urlscall fetches one page. SupplynextOffsetasoffseton a subsequent call with the same inputs. A full page can be the last page, so a subsequent read may be empty. For stable comparisons, use completed days. - Rate limits. Budget one request per page plus any retry. If a scheduled run encounters rate limiting, spread the requests over time.
- API limits. The connector covers daily summary and flat page reports from standard Matomo Cloud tenant hosts. Use Matomo directly for self-hosted or custom-domain installations, date ranges, segmentation, visitor-level records, or administration.
- Idempotency and destructive behavior. Both operations read reports and leave Matomo data and settings untouched. A repeated read can change as the provider processes more data.
- Provider verification. Run a small report with an authorized site before scheduling the workflow.