Skip to main content

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​

  1. 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 is example.
  2. Create a Reporting API token with View access to that site. Enable Only allow secure requests when creating the token.
  3. Choose Matomo Cloud in the Integration Account Console. Save the tenant label as Matomo Cloud Instance and the token as Matomo Auth Token.
  4. 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.
  5. Check the result's status before using the metrics or rows in another step.

Inputs​

InputTypePurpose
operationstringvisits_summary (default) or page_urls.
siteIdintegerRequired numeric ID of the Matomo website, from 1 to 2,147,483,647. The selected connection must have View access to that site.
datestringRequired site-local reporting date in YYYY-MM-DD format.
pageSizeintegerFor page_urls, maximum rows per request. Defaults to 50 and accepts 1–100.
offsetintegerFor page_urls, zero-based row offset. Defaults to 0 and accepts 0–10,000.

Outputs​

OutputTypeMeaning
statusstringsuccess or error.
httpStatusintegerProvider HTTP status when available.
attemptsintegerNumber of provider request attempts.
errorobjectOn failure, sanitized details and whether a later retry may help.
summaryobjectDaily visits, plus uniqueVisitors, actions, and bounceRate when available.
rowsarrayPage report rows with a label and pageviews, plus visits and uniqueVisitors when available.
countintegerNumber of rows returned by page_urls.
nextOffsetintegerCandidate 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.get to 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.getPageUrls to 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.

Matomo Reporting API

Errors and Failure Modes​

ConditionWhat to check
Input validation failureCheck the operation, numeric site ID, reporting date, and page size or offset.
Missing or unready connectionSelect a ready Matomo connection with the correct tenant label and protected token.
Outbound request blockedCheck the cloud tenant label and allowed destination in the workflow network policy.
HTTP 401 or 403Check the token's validity and View access for the numeric site ID.
HTTP 429Space out requests from workflows that share the Matomo connection.
MATOMO_REPORT_ERRORMatomo returned a report error. Verify the site, date, and access to the report.
INVALID_PROVIDER_RESPONSE or RESPONSE_TOO_LARGEFor 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_urls call fetches one page. Supply nextOffset as offset on 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.