APIAnalyticsMatomo API
Matomo API and MCP. Bring your client's Matomo traffic and conversions into your own dashboard and AI.
Connect a client's self-hosted Matomo or Matomo Cloud installation once with a view token. Read visits, channels including AI assistants, landing pages, countries, devices, goals and shop orders over JSON or in Claude and ChatGPT. Included in every plan at no extra cost.
Traffic and goals
Visits, daily series, channels, sources, pages, countries, devices, goals and shop revenue against the previous period or year.
AI assistant visits
Matomo counts referrals from ChatGPT, Gemini and Perplexity in their own ai channel, down to the landing page.
Self-hosted or Cloud
Connect any public https Matomo address with a view token in the app or through matomo.connect.
In every plan
60 calls a minute on a personal key and 600 on a white label key, included in your subscription.
Matomo endpoints and MCP tools
Every read endpoint is a POST or GET to /rest/v1/matomo.* with a matching get_matomo_* tool in the MCP. Connecting, choosing a site and disconnecting go through the REST API. Calls to your client's Matomo installation only read reports and change nothing in Matomo.
| Endpoint | MCP tool | What it returns |
|---|---|---|
matomo.summary | get_matomo_summary | Totals for the period against the previous period or year: visits, new and returning visits, pageviews, actions per visit, visit duration, bounce rate, conversions, conversion rate and revenue. |
matomo.daily | get_matomo_daily | Every day of the period, oldest first, with visits, unique visitors, pageviews, actions per visit, duration, bounce rate, conversions and revenue next to the matching day of the comparison period. |
matomo.channels | get_matomo_channels | Visits, conversions and revenue per channel (direct, search, website, campaign, social, ai), sorted by visits, with share and previous period. |
matomo.sources | get_matomo_sources | The search engines, websites, campaigns, social networks and AI assistants that sent visits, optionally filtered to one channel. |
matomo.landing_pages | get_matomo_landing_pages | Pages where visits started, with entrances, actions per visit, duration, bounce rate and conversions, optionally filtered by channel and source. |
matomo.pages | get_matomo_pages | All viewed pages sorted by pageviews, with unique pageviews (visits), average time on page, entrances, bounce rate and exit rate. |
matomo.countries | get_matomo_countries | Visits, actions, duration, bounce rate, conversions and revenue per country (ISO code and English name). |
matomo.devices | get_matomo_devices | Visits, conversions and revenue per device type (mobile, desktop, tablet, other). |
matomo.goals | get_matomo_goals | Conversions, converted visits, revenue and conversion rate per Matomo goal and for web shop orders (ecommerceOrder). |
matomo.sites | get_matomo_sites | Whether Matomo is connected, the installation URL, the chosen matomo_site_id, and all sites the token can view. The token itself is never returned. |
matomo.connect | REST only | Connects a public https:// Matomo installation with a view token and returns the sites that token can read. |
matomo.site_set | REST only | Picks which matomo_site_id from matomo.sites belongs to this client site. |
matomo.disconnect | REST only | Removes the Matomo address, token and chosen site from MarketingTracer. |
A real matomo.channels call and its answer
Every read endpoint takes days (default 28) or from and to (up to 366 days, up to yesterday), plus compare (previous_period or previous_year). Each call fetches both periods from Matomo in one bulk request and returns every row with its previous figures and meta.currency:
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.channels \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28,"limit":3}'
{
"data": [
{
"channel": "search",
"visits": 5312,
"actions": 21091,
"actions_per_visit": 4,
"avg_visit_duration": 142,
"bounce_rate_pct": 40.2,
"conversions": 111,
"conversion_rate_pct": 2.09,
"revenue": 13120.64,
"share_pct": 46.7,
"previous": {
"visits": 4643,
"actions": 17907,
"actions_per_visit": 3.9,
"avg_visit_duration": 138,
"bounce_rate_pct": 41.4,
"conversions": 81,
"conversion_rate_pct": 1.74,
"revenue": 9564.58
}
},
{
"channel": "direct",
"visits": 2684,
"actions": 12158,
"actions_per_visit": 4.5,
"avg_visit_duration": 162,
"bounce_rate_pct": 35.3,
"conversions": 62,
"conversion_rate_pct": 2.31,
"revenue": 7273.64,
"share_pct": 23.6,
"previous": { … }
},
…
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": "3",
"total": 6,
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Put your Matomo clients in the same report as everyone else
Most agencies have a few clients in healthcare, government or e-commerce who run self-hosted Matomo or Matomo Cloud for privacy reasons. When you build your client portal or monthly report on our API, those sites run through the same script as your other clients.
Connect a Matomo installation once through matomo.connect and matomo.site_set, or let the client paste their view token in the dashboard. Your report reads matomo.summary, matomo.daily, matomo.channels and matomo.goals with the same API key it uses for Search Console and rankings. Totals come back with value, previous, change and change_pct. Revenue sits in the site's own currency (meta.currency).
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.connect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","url":"https://stats.example.com","token":"YOUR_MATOMO_TOKEN"}'
{
"data": {
"connected": true,
"url": "https://stats.example.com",
"sites": [
{
"matomo_site_id": 1,
"name": "Example shop",
"main_url": "https://www.example.com",
"currency": "EUR",
"ecommerce": true
},
…
]
},
"meta": { "site_id": "YOUR_SITE_ID" }
}
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.landing_pages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28,"channel":"search","source":"Google","limit":2}'
{
"data": [
{
"page": "/",
"url": "https://www.yourwebshop.com/",
"entrances": 992,
"actions_per_visit": 4.7,
"avg_visit_duration": 167,
"bounce_rate_pct": 34.4,
"conversions": 24,
"conversion_rate_pct": 2.4,
"share_pct": 23.5,
"previous": {
"entrances": 898,
"actions_per_visit": 4.5,
"avg_visit_duration": 160,
"bounce_rate_pct": 35.4,
"conversions": 19,
"conversion_rate_pct": 2.1
}
},
{
"page": "/running-shoes/",
"url": "https://www.yourwebshop.com/running-shoes/",
"entrances": 922,
"actions_per_visit": 3.7,
"avg_visit_duration": 131,
"bounce_rate_pct": 43.4,
"conversions": 17,
"conversion_rate_pct": 1.8,
"share_pct": 21.8,
"previous": { … }
}
],
"meta": { … }
}
Zoom in from channel to source to the page that converted
Matomo 5 groups referrals from ChatGPT, Gemini and Perplexity into their own ai channel, alongside direct, search, website, campaign and social.
When a client asks what AI assistants or organic search brought in last month, start with matomo.channels for the visits and conversions per channel. Pass channel to matomo.sources to see each search engine or AI assistant on its own. Then call matomo.landing_pages with both channel and source to see which pages those visitors landed on and whether they converted.
Ask your AI about Search Console and Matomo in one question
Every Matomo read endpoint is also a tool on the SEO MCP server. Sign in once from Claude or ChatGPT on your dashboard domain. Your assistant then reads Matomo right next to Search Console and the SEO audit.
When a page gains clicks in Google, ask your AI to pull get_search_console together with get_matomo_landing_pages and get_matomo_goals for the same 28 days. You see right away whether those extra clicks brought more entrances and goal conversions in Matomo. Each row also shows how bounce rate and visit duration changed.
Which pages gained Google clicks this month, and did they also get more entrances and conversions in Matomo?
Endpoints, arguments and field descriptions
Every endpoint is a POST with a JSON body; reading endpoints also take a GET with the same arguments in the query string. Send your API key as Authorization: Bearer YOUR_API_KEY. Every answer is {"data": …, "meta": {…}}: meta.site_id always, meta.next_cursor and meta.total for a list, meta.period where the endpoint covers a period. An error is {"error": {"code", "message"}} with the HTTP status: 400 invalid_argument, unknown_argument or missing_argument; 401 not_authenticated; 403 no_access or tool_off; 404 not_found; 409 not_connected (a connection the endpoint needs, such as Google Analytics 4, is missing); 429 rate_limited; 502 google_error (Google returned an error on your own Search Console or Analytics connection) or upstream_error (another data source did not answer; try again in a minute). The machine-readable version is openapi.json.
matomo.summary
POST /rest/v1/matomo.summary · MCP tool get_matomo_summary
Returns the Matomo totals of one site for the period against the previous period: visits, new and returning visits, pageviews, actions per visit, average visit duration, bounce rate, conversions, conversion rate and revenue, each as value, previous, change and change in percent. Per day: matomo.daily. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.summary \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28}'
Example response · Sample figures of a made-up web shop.
{
"data": {
"compare": "previous_period",
"visits": {"value": 11207, "previous": 10113, "change": 1094, "change_pct": 10.8},
"new_visits": {"value": 7622, "previous": 6876, "change": 746, "change_pct": 10.8},
"returning_visits": {"value": 3585, "previous": 3237, "change": 348, "change_pct": 10.8},
"pageviews": {"value": 36205, "previous": 31908, "change": 4297, "change_pct": 13.5},
"actions_per_visit": {"value": 3.5, "previous": 3.4, "change": 0.1, "change_pct": 2.9},
"avg_visit_duration": {"value": 124, "previous": 121, "change": 3, "change_pct": 2.5},
"bounce_rate_pct": {"value": 46, "previous": 47, "change": -1, "change_pct": -2.1},
"conversions": {"value": 334, "previous": 279, "change": 55, "change_pct": 19.7},
"conversion_rate_pct": {"value": 2.98, "previous": 2.76, "change": 0.22, "change_pct": 8},
"revenue": {"value": 19817.85, "previous": 17942.78, "change": 1875.07, "change_pct": 10.5}
},
"meta": {
"site_id": "YOUR_SITE_ID",
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
compare | string | previous_period or previous_year: what the previous figures are. |
visits | object | Visits in the period, against the previous period. |
visits.value | number or null | This period; null when it does not apply. |
visits.previous | number or null | The previous period; null when it does not apply. |
visits.change | number or null | value minus previous. |
visits.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
new_visits | object | Visits by first-time visitors in the period, against the previous period. |
new_visits.value | number or null | This period; null when it does not apply. |
new_visits.previous | number or null | The previous period; null when it does not apply. |
new_visits.change | number or null | value minus previous. |
new_visits.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
returning_visits | object | Visits by returning visitors in the period, against the previous period. |
returning_visits.value | number or null | This period; null when it does not apply. |
returning_visits.previous | number or null | The previous period; null when it does not apply. |
returning_visits.change | number or null | value minus previous. |
returning_visits.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
pageviews | object | Pageviews in the period, against the previous period. |
pageviews.value | number or null | This period; null when it does not apply. |
pageviews.previous | number or null | The previous period; null when it does not apply. |
pageviews.change | number or null | value minus previous. |
pageviews.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
actions_per_visit | object | Actions per visit in the period, against the previous period. |
actions_per_visit.value | number or null | This period; null when it does not apply. |
actions_per_visit.previous | number or null | The previous period; null when it does not apply. |
actions_per_visit.change | number or null | value minus previous. |
actions_per_visit.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
avg_visit_duration | object | Average visit duration in seconds in the period, against the previous period. |
avg_visit_duration.value | number or null | This period; null when it does not apply. |
avg_visit_duration.previous | number or null | The previous period; null when it does not apply. |
avg_visit_duration.change | number or null | value minus previous. |
avg_visit_duration.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
bounce_rate_pct | object | Bounce rate, 0-100, in the period, against the previous period. |
bounce_rate_pct.value | number or null | This period; null when it does not apply. |
bounce_rate_pct.previous | number or null | The previous period; null when it does not apply. |
bounce_rate_pct.change | number or null | value minus previous, in percentage points. |
bounce_rate_pct.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
conversions | object | Goal conversions (and orders) in the period, against the previous period. |
conversions.value | number or null | This period; null when it does not apply. |
conversions.previous | number or null | The previous period; null when it does not apply. |
conversions.change | number or null | value minus previous. |
conversions.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
conversion_rate_pct | object | Conversion rate (converted visits / visits), 0-100, in the period, against the previous period. |
conversion_rate_pct.value | number or null | This period; null when it does not apply. |
conversion_rate_pct.previous | number or null | The previous period; null when it does not apply. |
conversion_rate_pct.change | number or null | value minus previous, in percentage points. |
conversion_rate_pct.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
revenue | object | Revenue in the period, against the previous period. |
revenue.value | number or null | This period; null when it does not apply. |
revenue.previous | number or null | The previous period; null when it does not apply. |
revenue.change | number or null | value minus previous. |
revenue.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
matomo.daily
POST /rest/v1/matomo.daily · MCP tool get_matomo_daily
Returns the Matomo figures of one site per day of the period, oldest first, next to the matching day of the previous period. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.daily \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28}'
Example response · Sample figures of a made-up web shop.
{
"data": {
"compare": "previous_period",
"days": [
{
"date": "2026-10-18",
"visits": 365,
"unique_visitors": 329,
"pageviews": 1130,
"actions_per_visit": 3.3,
"avg_visit_duration": 119,
"bounce_rate_pct": 47.9,
"conversions": 10,
"revenue": 534.77,
"previous_date": "2026-09-20",
"previous": {
"visits": 394,
"unique_visitors": 355,
"pageviews": 1199,
"actions_per_visit": 3.3,
"avg_visit_duration": 117,
"bounce_rate_pct": 48.7,
"conversions": 13,
"revenue": 877.9
}
},
{
"date": "2026-10-19",
"visits": 432,
"unique_visitors": 389,
"pageviews": 1356,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47.2,
"conversions": 11,
"revenue": 566.19,
"previous_date": "2026-09-21",
"previous": {
"visits": 457,
"unique_visitors": 411,
"pageviews": 1463,
"actions_per_visit": 3.4,
"avg_visit_duration": 123,
"bounce_rate_pct": 46.4,
"conversions": 16,
"revenue": 1058.19
}
},
{
"date": "2026-10-20",
"visits": 399,
"unique_visitors": 359,
"pageviews": 1234,
"actions_per_visit": 3.3,
"avg_visit_duration": 119,
"bounce_rate_pct": 48.1,
"conversions": 12,
"revenue": 649.79,
"previous_date": "2026-09-22",
"previous": {
"visits": 430,
"unique_visitors": 387,
"pageviews": 1282,
"actions_per_visit": 3.2,
"avg_visit_duration": 114,
"bounce_rate_pct": 49.8,
"conversions": 11,
"revenue": 618.56
}
},
{
"date": "2026-10-21",
"visits": 385,
"unique_visitors": 347,
"pageviews": 1187,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 48.1,
"conversions": 13,
"revenue": 776.78,
"previous_date": "2026-09-23",
"previous": {
"visits": 374,
"unique_visitors": 337,
"pageviews": 1120,
"actions_per_visit": 3.2,
"avg_visit_duration": 115,
"bounce_rate_pct": 49.5,
"conversions": 13,
"revenue": 883.41
}
},
{
"date": "2026-10-22",
"visits": 341,
"unique_visitors": 307,
"pageviews": 1057,
"actions_per_visit": 3.3,
"avg_visit_duration": 119,
"bounce_rate_pct": 47.8,
"conversions": 9,
"revenue": 514.31,
"previous_date": "2026-09-24",
"previous": {
"visits": 322,
"unique_visitors": 290,
"pageviews": 1024,
"actions_per_visit": 3.4,
"avg_visit_duration": 122,
"bounce_rate_pct": 46.6,
"conversions": 9,
"revenue": 447.17
}
},
{
"date": "2026-10-23",
"visits": 411,
"unique_visitors": 370,
"pageviews": 1221,
"actions_per_visit": 3.2,
"avg_visit_duration": 114,
"bounce_rate_pct": 49.9,
"conversions": 13,
"revenue": 796.53,
"previous_date": "2026-09-25",
"previous": {
"visits": 409,
"unique_visitors": 368,
"pageviews": 1303,
"actions_per_visit": 3.4,
"avg_visit_duration": 122,
"bounce_rate_pct": 46.7,
"conversions": 11,
"revenue": 541.02
}
},
{
"date": "2026-10-24",
"visits": 292,
"unique_visitors": 263,
"pageviews": 905,
"actions_per_visit": 3.3,
"avg_visit_duration": 119,
"bounce_rate_pct": 47.9,
"conversions": 8,
"revenue": 499.65,
"previous_date": "2026-09-26",
"previous": {
"visits": 339,
"unique_visitors": 305,
"pageviews": 1069,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47.2,
"conversions": 9,
"revenue": 442.49
}
},
{
"date": "2026-10-25",
"visits": 368,
"unique_visitors": 331,
"pageviews": 1158,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47.3,
"conversions": 13,
"revenue": 777.36,
"previous_date": "2026-09-27",
"previous": {
"visits": 373,
"unique_visitors": 336,
"pageviews": 1123,
"actions_per_visit": 3.2,
"avg_visit_duration": 116,
"bounce_rate_pct": 49.3,
"conversions": 10,
"revenue": 435.7
}
},
{
"date": "2026-10-26",
"visits": 369,
"unique_visitors": 332,
"pageviews": 1163,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47.2,
"conversions": 12,
"revenue": 702.55,
"previous_date": "2026-09-28",
"previous": {
"visits": 446,
"unique_visitors": 401,
"pageviews": 1426,
"actions_per_visit": 3.4,
"avg_visit_duration": 123,
"bounce_rate_pct": 46.4,
"conversions": 12,
"revenue": 581.5
}
},
{
"date": "2026-10-27",
"visits": 368,
"unique_visitors": 331,
"pageviews": 1100,
"actions_per_visit": 3.2,
"avg_visit_duration": 115,
"bounce_rate_pct": 49.7,
"conversions": 10,
"revenue": 485.73,
"previous_date": "2026-09-29",
"previous": {
"visits": 406,
"unique_visitors": 365,
"pageviews": 1293,
"actions_per_visit": 3.4,
"avg_visit_duration": 122,
"bounce_rate_pct": 46.6,
"conversions": 12,
"revenue": 649.6
}
},
{
"date": "2026-10-28",
"visits": 423,
"unique_visitors": 381,
"pageviews": 1280,
"actions_per_visit": 3.3,
"avg_visit_duration": 116,
"bounce_rate_pct": 48.9,
"conversions": 14,
"revenue": 907.87,
"previous_date": "2026-09-30",
"previous": {
"visits": 361,
"unique_visitors": 325,
"pageviews": 1162,
"actions_per_visit": 3.5,
"avg_visit_duration": 124,
"bounce_rate_pct": 46,
"conversions": 13,
"revenue": 889.87
}
},
{
"date": "2026-10-29",
"visits": 437,
"unique_visitors": 393,
"pageviews": 1335,
"actions_per_visit": 3.3,
"avg_visit_duration": 117,
"bounce_rate_pct": 48.5,
"conversions": 12,
"revenue": 583.86,
"previous_date": "2026-10-01",
"previous": {
"visits": 341,
"unique_visitors": 307,
"pageviews": 1113,
"actions_per_visit": 3.5,
"avg_visit_duration": 125,
"bounce_rate_pct": 45.5,
"conversions": 12,
"revenue": 821.75
}
},
{
"date": "2026-10-30",
"visits": 366,
"unique_visitors": 329,
"pageviews": 1161,
"actions_per_visit": 3.4,
"avg_visit_duration": 122,
"bounce_rate_pct": 46.7,
"conversions": 13,
"revenue": 941.85,
"previous_date": "2026-10-02",
"previous": {
"visits": 367,
"unique_visitors": 330,
"pageviews": 1125,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 48.5,
"conversions": 10,
"revenue": 520.53
}
},
{
"date": "2026-10-31",
"visits": 332,
"unique_visitors": 299,
"pageviews": 1006,
"actions_per_visit": 3.3,
"avg_visit_duration": 116,
"bounce_rate_pct": 49.1,
"conversions": 9,
"revenue": 418.75,
"previous_date": "2026-10-03",
"previous": {
"visits": 279,
"unique_visitors": 251,
"pageviews": 884,
"actions_per_visit": 3.4,
"avg_visit_duration": 122,
"bounce_rate_pct": 47,
"conversions": 9,
"revenue": 555.49
}
},
{
"date": "2026-11-01",
"visits": 405,
"unique_visitors": 365,
"pageviews": 1317,
"actions_per_visit": 3.5,
"avg_visit_duration": 125,
"bounce_rate_pct": 45.7,
"conversions": 12,
"revenue": 703.24,
"previous_date": "2026-10-04",
"previous": {
"visits": 371,
"unique_visitors": 334,
"pageviews": 1132,
"actions_per_visit": 3.3,
"avg_visit_duration": 117,
"bounce_rate_pct": 48.5,
"conversions": 11,
"revenue": 619.73
}
},
{
"date": "2026-11-02",
"visits": 448,
"unique_visitors": 403,
"pageviews": 1461,
"actions_per_visit": 3.5,
"avg_visit_duration": 125,
"bounce_rate_pct": 45.5,
"conversions": 14,
"revenue": 781.73,
"previous_date": "2026-10-05",
"previous": {
"visits": 422,
"unique_visitors": 380,
"pageviews": 1329,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47.2,
"conversions": 12,
"revenue": 741.15
}
},
{
"date": "2026-11-03",
"visits": 520,
"unique_visitors": 468,
"pageviews": 1622,
"actions_per_visit": 3.4,
"avg_visit_duration": 120,
"bounce_rate_pct": 47.5,
"conversions": 16,
"revenue": 887.8,
"previous_date": "2026-10-06",
"previous": {
"visits": 406,
"unique_visitors": 365,
"pageviews": 1235,
"actions_per_visit": 3.3,
"avg_visit_duration": 117,
"bounce_rate_pct": 48.8,
"conversions": 13,
"revenue": 820.78
}
},
{
"date": "2026-11-04",
"visits": 394,
"unique_visitors": 355,
"pageviews": 1232,
"actions_per_visit": 3.4,
"avg_visit_duration": 120,
"bounce_rate_pct": 47.5,
"conversions": 11,
"revenue": 598.19,
"previous_date": "2026-10-07",
"previous": {
"visits": 355,
"unique_visitors": 320,
"pageviews": 1087,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 48.5,
"conversions": 10,
"revenue": 591.15
}
},
{
"date": "2026-11-05",
"visits": 418,
"unique_visitors": 376,
"pageviews": 1326,
"actions_per_visit": 3.4,
"avg_visit_duration": 122,
"bounce_rate_pct": 46.9,
"conversions": 14,
"revenue": 887.49,
"previous_date": "2026-10-08",
"previous": {
"visits": 342,
"unique_visitors": 308,
"pageviews": 1056,
"actions_per_visit": 3.3,
"avg_visit_duration": 119,
"bounce_rate_pct": 48,
"conversions": 11,
"revenue": 699.83
}
},
{
"date": "2026-11-06",
"visits": 397,
"unique_visitors": 357,
"pageviews": 1242,
"actions_per_visit": 3.4,
"avg_visit_duration": 120,
"bounce_rate_pct": 47.4,
"conversions": 13,
"revenue": 779.1,
"previous_date": "2026-10-09",
"previous": {
"visits": 319,
"unique_visitors": 287,
"pageviews": 1002,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47.3,
"conversions": 9,
"revenue": 499.59
}
},
{
"date": "2026-11-07",
"visits": 315,
"unique_visitors": 284,
"pageviews": 965,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 48.6,
"conversions": 8,
"revenue": 411.13,
"previous_date": "2026-10-10",
"previous": {
"visits": 292,
"unique_visitors": 263,
"pageviews": 923,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 46.9,
"conversions": 11,
"revenue": 779.62
}
},
{
"date": "2026-11-08",
"visits": 372,
"unique_visitors": 335,
"pageviews": 1114,
"actions_per_visit": 3.2,
"avg_visit_duration": 115,
"bounce_rate_pct": 49.5,
"conversions": 11,
"revenue": 618.26,
"previous_date": "2026-10-11",
"previous": {
"visits": 333,
"unique_visitors": 300,
"pageviews": 1041,
"actions_per_visit": 3.4,
"avg_visit_duration": 120,
"bounce_rate_pct": 47.4,
"conversions": 9,
"revenue": 414.37
}
},
{
"date": "2026-11-09",
"visits": 369,
"unique_visitors": 332,
"pageviews": 1099,
"actions_per_visit": 3.2,
"avg_visit_duration": 114,
"bounce_rate_pct": 49.9,
"conversions": 12,
"revenue": 700.09,
"previous_date": "2026-10-12",
"previous": {
"visits": 312,
"unique_visitors": 281,
"pageviews": 985,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47.1,
"conversions": 11,
"revenue": 651.46
}
},
{
"date": "2026-11-10",
"visits": 554,
"unique_visitors": 499,
"pageviews": 1682,
"actions_per_visit": 3.3,
"avg_visit_duration": 117,
"bounce_rate_pct": 48.9,
"conversions": 14,
"revenue": 721.83,
"previous_date": "2026-10-13",
"previous": {
"visits": 374,
"unique_visitors": 337,
"pageviews": 1154,
"actions_per_visit": 3.3,
"avg_visit_duration": 119,
"bounce_rate_pct": 48.1,
"conversions": 10,
"revenue": 456.75
}
},
{
"date": "2026-11-11",
"visits": 505,
"unique_visitors": 455,
"pageviews": 1556,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 48.1,
"conversions": 15,
"revenue": 782.67,
"previous_date": "2026-10-14",
"previous": {
"visits": 367,
"unique_visitors": 330,
"pageviews": 1175,
"actions_per_visit": 3.4,
"avg_visit_duration": 123,
"bounce_rate_pct": 46.3,
"conversions": 12,
"revenue": 724.91
}
},
{
"date": "2026-11-12",
"visits": 489,
"unique_visitors": 440,
"pageviews": 1508,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 48.1,
"conversions": 13,
"revenue": 738.42,
"previous_date": "2026-10-15",
"previous": {
"visits": 303,
"unique_visitors": 273,
"pageviews": 991,
"actions_per_visit": 3.5,
"avg_visit_duration": 126,
"bounce_rate_pct": 45.2,
"conversions": 9,
"revenue": 456.48
}
},
{
"date": "2026-11-13",
"visits": 392,
"unique_visitors": 353,
"pageviews": 1202,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 48.5,
"conversions": 12,
"revenue": 752.62,
"previous_date": "2026-10-16",
"previous": {
"visits": 333,
"unique_visitors": 300,
"pageviews": 993,
"actions_per_visit": 3.2,
"avg_visit_duration": 115,
"bounce_rate_pct": 49.8,
"conversions": 10,
"revenue": 616.41
}
},
{
"date": "2026-11-14",
"visits": 341,
"unique_visitors": 307,
"pageviews": 1016,
"actions_per_visit": 3.2,
"avg_visit_duration": 115,
"bounce_rate_pct": 49.9,
"conversions": 9,
"revenue": 453.17,
"previous_date": "2026-10-17",
"previous": {
"visits": 286,
"unique_visitors": 257,
"pageviews": 879,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 48.3,
"conversions": 7,
"revenue": 359.96
}
}
]
},
"meta": {
"site_id": "YOUR_SITE_ID",
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
compare | string | previous_period or previous_year: what the previous figures are. |
days | array | Per day of the period, oldest first. |
days[].date | string | The day, YYYY-MM-DD. |
days[].visits | integer | Visits. |
days[].unique_visitors | integer | Unique visitors that day. |
days[].pageviews | integer | Pageviews. |
days[].actions_per_visit | number or null | Actions per visit. |
days[].avg_visit_duration | integer or null | Average visit duration in seconds. |
days[].bounce_rate_pct | number or null | Bounce rate, 0-100. |
days[].conversions | integer | Goal conversions (and orders). |
days[].revenue | number | Revenue. |
days[].previous_date | string | The matching day of the previous period, YYYY-MM-DD. |
days[].previous | object | The same figures on previous_date. |
days[].previous.visits | integer | Visits. |
days[].previous.unique_visitors | integer | Unique visitors that day. |
days[].previous.pageviews | integer | Pageviews. |
days[].previous.actions_per_visit | number or null | Actions per visit. |
days[].previous.avg_visit_duration | integer or null | Average visit duration in seconds. |
days[].previous.bounce_rate_pct | number or null | Bounce rate, 0-100. |
days[].previous.conversions | integer | Goal conversions (and orders). |
days[].previous.revenue | number | Revenue. |
matomo.channels
POST /rest/v1/matomo.channels · MCP tool get_matomo_channels
Returns the visits of one site per channel in the period (direct, search engines, other websites, campaigns, social, AI assistants), most visits first, with conversions, revenue and the previous period. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
limit | integer, 1 to 500, default 100 | Items per call. |
cursor | string | meta.next_cursor of the previous call, for the next page. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.channels \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28,"limit":3}'
Example response · Sample figures of a made-up web shop.
{
"data": [
{
"channel": "search",
"visits": 5312,
"actions": 21091,
"actions_per_visit": 4,
"avg_visit_duration": 142,
"bounce_rate_pct": 40.2,
"conversions": 111,
"conversion_rate_pct": 2.09,
"revenue": 13120.64,
"share_pct": 46.7,
"previous": {
"visits": 4643,
"actions": 17907,
"actions_per_visit": 3.9,
"avg_visit_duration": 138,
"bounce_rate_pct": 41.4,
"conversions": 81,
"conversion_rate_pct": 1.74,
"revenue": 9564.58
}
},
{
"channel": "direct",
"visits": 2684,
"actions": 12158,
"actions_per_visit": 4.5,
"avg_visit_duration": 162,
"bounce_rate_pct": 35.3,
"conversions": 62,
"conversion_rate_pct": 2.31,
"revenue": 7273.64,
"share_pct": 23.6,
"previous": {
"visits": 2442,
"actions": 11133,
"actions_per_visit": 4.6,
"avg_visit_duration": 163,
"bounce_rate_pct": 35.1,
"conversions": 52,
"conversion_rate_pct": 2.13,
"revenue": 6080.58
}
},
{
"channel": "campaign",
"visits": 1140,
"actions": 5006,
"actions_per_visit": 4.4,
"avg_visit_duration": 157,
"bounce_rate_pct": 36.3,
"conversions": 25,
"conversion_rate_pct": 2.19,
"revenue": 2998.2,
"share_pct": 10,
"previous": {
"visits": 1023,
"actions": 4259,
"actions_per_visit": 4.2,
"avg_visit_duration": 149,
"bounce_rate_pct": 38.1,
"conversions": 20,
"conversion_rate_pct": 1.96,
"revenue": 2404.05
}
}
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": "3",
"total": 6,
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
channel | string | direct, search, website, campaign, social or ai. |
visits | integer | Visits. |
actions | integer | Actions (pageviews, downloads, outlinks, site searches). |
actions_per_visit | number or null | Actions per visit; null without visits. |
avg_visit_duration | integer or null | Average visit duration in seconds; null without visits. |
bounce_rate_pct | number or null | Visits with one action, 0-100; null without visits. |
conversions | integer | Visits that converted a goal (or placed an order). |
conversion_rate_pct | number or null | Converted visits as a share of visits, 0-100; null without visits. |
revenue | number | Revenue from goals and orders, in the currency of the Matomo site (meta.currency). |
share_pct | number or null | Share of the visits of the whole list, 0-100. |
previous | object or null | The same figures in the previous period; null when it did not occur then. |
previous.visits | integer | Visits. |
previous.actions | integer | Actions (pageviews, downloads, outlinks, site searches). |
previous.actions_per_visit | number or null | Actions per visit; null without visits. |
previous.avg_visit_duration | integer or null | Average visit duration in seconds; null without visits. |
previous.bounce_rate_pct | number or null | Visits with one action, 0-100; null without visits. |
previous.conversions | integer | Visits that converted a goal (or placed an order). |
previous.conversion_rate_pct | number or null | Converted visits as a share of visits, 0-100; null without visits. |
previous.revenue | number | Revenue from goals and orders, in the currency of the Matomo site (meta.currency). |
matomo.sources
POST /rest/v1/matomo.sources · MCP tool get_matomo_sources
Returns where the visits of one site came from in the period: the search engines, websites, campaigns, social networks and AI assistants, optionally of one channel, most visits first, with the previous period. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
channel | one of direct, search, website, campaign, social, ai | Only this channel: direct, search (search engines), website (other websites), campaign (links with utm or mtm tags), social or ai (AI assistants such as ChatGPT). |
limit | integer, 1 to 500, default 100 | Items per call. |
cursor | string | meta.next_cursor of the previous call, for the next page. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.sources \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28,"channel":"search"}'
Example response · Sample figures of a made-up web shop.
{
"data": [
{
"source": "Google",
"channel": "search",
"visits": 4576,
"actions": 15919,
"actions_per_visit": 3.5,
"avg_visit_duration": 124,
"bounce_rate_pct": 45.8,
"conversions": 77,
"conversion_rate_pct": 1.68,
"revenue": 9014.72,
"share_pct": 90,
"previous": {
"visits": 4308,
"actions": 14583,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47.1,
"conversions": 71,
"conversion_rate_pct": 1.65,
"revenue": 8357.52
}
},
{
"source": "Bing",
"channel": "search",
"visits": 358,
"actions": 1159,
"actions_per_visit": 3.2,
"avg_visit_duration": 116,
"bounce_rate_pct": 48,
"conversions": 6,
"conversion_rate_pct": 1.68,
"revenue": 655.14,
"share_pct": 7,
"previous": {
"visits": 328,
"actions": 1103,
"actions_per_visit": 3.4,
"avg_visit_duration": 120,
"bounce_rate_pct": 47.6,
"conversions": 5,
"conversion_rate_pct": 1.52,
"revenue": 636.32
}
},
{
"source": "DuckDuckGo",
"channel": "search",
"visits": 153,
"actions": 518,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 45.8,
"conversions": 2,
"conversion_rate_pct": 1.31,
"revenue": 286.11,
"share_pct": 3,
"previous": {
"visits": 139,
"actions": 463,
"actions_per_visit": 3.3,
"avg_visit_duration": 118,
"bounce_rate_pct": 46,
"conversions": 2,
"conversion_rate_pct": 1.44,
"revenue": 258.54
}
}
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": null,
"total": 3,
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
source | string | The search engine (Google), website (domain), campaign name, social network or AI assistant (ChatGPT). |
channel | string | Its channel: search, website, campaign, social or ai. |
visits | integer | Visits. |
actions | integer | Actions (pageviews, downloads, outlinks, site searches). |
actions_per_visit | number or null | Actions per visit; null without visits. |
avg_visit_duration | integer or null | Average visit duration in seconds; null without visits. |
bounce_rate_pct | number or null | Visits with one action, 0-100; null without visits. |
conversions | integer | Visits that converted a goal (or placed an order). |
conversion_rate_pct | number or null | Converted visits as a share of visits, 0-100; null without visits. |
revenue | number | Revenue from goals and orders, in the currency of the Matomo site (meta.currency). |
share_pct | number or null | Share of the visits of the whole list, 0-100. |
previous | object or null | The same figures in the previous period; null when it did not occur then. |
previous.visits | integer | Visits. |
previous.actions | integer | Actions (pageviews, downloads, outlinks, site searches). |
previous.actions_per_visit | number or null | Actions per visit; null without visits. |
previous.avg_visit_duration | integer or null | Average visit duration in seconds; null without visits. |
previous.bounce_rate_pct | number or null | Visits with one action, 0-100; null without visits. |
previous.conversions | integer | Visits that converted a goal (or placed an order). |
previous.conversion_rate_pct | number or null | Converted visits as a share of visits, 0-100; null without visits. |
previous.revenue | number | Revenue from goals and orders, in the currency of the Matomo site (meta.currency). |
matomo.landing_pages
POST /rest/v1/matomo.landing_pages · MCP tool get_matomo_landing_pages
Returns the pages visits started on in the period, optionally only for one channel or one source, most entrances first, with the previous period. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
channel | one of direct, search, website, campaign, social, ai | Only this channel: direct, search (search engines), website (other websites), campaign (links with utm or mtm tags), social or ai (AI assistants such as ChatGPT). |
source | string | Only visits from this source (a source from matomo.sources, e.g. Google); give channel with it. |
limit | integer, 1 to 500, default 100 | Items per call. |
cursor | string | meta.next_cursor of the previous call, for the next page. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.landing_pages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28,"channel":"search","source":"Google","limit":2}'
Example response · Sample figures of a made-up web shop.
{
"data": [
{
"page": "/",
"url": "https://www.yourwebshop.com/",
"entrances": 992,
"actions_per_visit": 4.7,
"avg_visit_duration": 167,
"bounce_rate_pct": 34.4,
"conversions": 24,
"conversion_rate_pct": 2.4,
"share_pct": 23.5,
"previous": {
"entrances": 898,
"actions_per_visit": 4.5,
"avg_visit_duration": 160,
"bounce_rate_pct": 35.4,
"conversions": 19,
"conversion_rate_pct": 2.1
}
},
{
"page": "/running-shoes/",
"url": "https://www.yourwebshop.com/running-shoes/",
"entrances": 922,
"actions_per_visit": 3.7,
"avg_visit_duration": 131,
"bounce_rate_pct": 43.4,
"conversions": 17,
"conversion_rate_pct": 1.8,
"share_pct": 21.8,
"previous": {
"entrances": 859,
"actions_per_visit": 3.6,
"avg_visit_duration": 128,
"bounce_rate_pct": 44.6,
"conversions": 16,
"conversion_rate_pct": 1.9
}
}
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": "2",
"total": 8,
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
page | string | The path of the page (/shop/shoes). |
url | string or null | The full address. |
entrances | integer | Visits that started on this page. |
actions_per_visit | number or null | Actions per visit that started here. |
avg_visit_duration | integer or null | Average duration in seconds of the visits that started here. |
bounce_rate_pct | number or null | Visits that started and ended here, 0-100. |
conversions | integer | Converted visits that started here (from Matomo's conversion rate). |
conversion_rate_pct | number or null | Converted visits as a share of the entrances, 0-100. |
share_pct | number or null | Share of the entrances of the whole list, 0-100. |
previous | object or null | The same figures in the previous period; null when it did not occur then. |
previous.entrances | integer | Visits that started on this page. |
previous.actions_per_visit | number or null | Actions per visit that started here. |
previous.avg_visit_duration | integer or null | Average duration in seconds of the visits that started here. |
previous.bounce_rate_pct | number or null | Visits that started and ended here, 0-100. |
previous.conversions | integer | Converted visits that started here (from Matomo's conversion rate). |
previous.conversion_rate_pct | number or null | Converted visits as a share of the entrances, 0-100. |
matomo.pages
POST /rest/v1/matomo.pages · MCP tool get_matomo_pages
Returns every page viewed in the period, most pageviews first, with time on page, entrances, bounce and exit rate and the previous period. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
limit | integer, 1 to 500, default 100 | Items per call. |
cursor | string | meta.next_cursor of the previous call, for the next page. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.pages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28,"limit":2}'
Example response · Sample figures of a made-up web shop.
{
"data": [
{
"page": "/",
"url": "https://www.yourwebshop.com/",
"pageviews": 4574,
"visits": 3388,
"avg_time_on_page": 41,
"entrances": 3388,
"bounce_rate_pct": 34.7,
"exit_rate_pct": 45,
"share_pct": 27.2,
"previous": {
"pageviews": 4111,
"visits": 3045,
"avg_time_on_page": 41,
"entrances": 3045,
"bounce_rate_pct": 33.5,
"exit_rate_pct": 45
}
},
{
"page": "/running-shoes/",
"url": "https://www.yourwebshop.com/running-shoes/",
"pageviews": 3845,
"visits": 2848,
"avg_time_on_page": 41,
"entrances": 2848,
"bounce_rate_pct": 37.3,
"exit_rate_pct": 45,
"share_pct": 22.9,
"previous": {
"pageviews": 3686,
"visits": 2730,
"avg_time_on_page": 41,
"entrances": 2730,
"bounce_rate_pct": 37.8,
"exit_rate_pct": 45
}
}
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": "2",
"total": 10,
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
page | string | The path of the page. |
url | string or null | The full address. |
pageviews | integer | Pageviews. |
visits | integer | Visits that viewed the page (unique pageviews). |
avg_time_on_page | integer or null | Average time on the page in seconds. |
entrances | integer | Visits that started on this page. |
bounce_rate_pct | number or null | Visits that started and ended here, as a share of the entrances, 0-100. |
exit_rate_pct | number or null | Visits that ended here, as a share of its visits, 0-100. |
share_pct | number or null | Share of the pageviews of the whole list, 0-100. |
previous | object or null | The same figures in the previous period; null when it did not occur then. |
previous.pageviews | integer | Pageviews. |
previous.visits | integer | Visits that viewed the page (unique pageviews). |
previous.avg_time_on_page | integer or null | Average time on the page in seconds. |
previous.entrances | integer | Visits that started on this page. |
previous.bounce_rate_pct | number or null | Visits that started and ended here, as a share of the entrances, 0-100. |
previous.exit_rate_pct | number or null | Visits that ended here, as a share of its visits, 0-100. |
matomo.countries
POST /rest/v1/matomo.countries · MCP tool get_matomo_countries
Returns the visits of one site per country in the period, most visits first, with the previous period. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
limit | integer, 1 to 500, default 100 | Items per call. |
cursor | string | meta.next_cursor of the previous call, for the next page. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.countries \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28,"limit":2}'
Example response · Sample figures of a made-up web shop.
{
"data": [
{
"country_code": "gb",
"country": "United Kingdom",
"visits": 8640,
"actions": 33506,
"actions_per_visit": 3.9,
"avg_visit_duration": 139,
"bounce_rate_pct": 41.2,
"conversions": 163,
"conversion_rate_pct": 1.89,
"revenue": 19267.2,
"share_pct": 78,
"previous": {
"visits": 7966,
"actions": 32823,
"actions_per_visit": 4.1,
"avg_visit_duration": 147,
"bounce_rate_pct": 38.7,
"conversions": 149,
"conversion_rate_pct": 1.87,
"revenue": 17525.2
}
},
{
"country_code": "ie",
"country": "Ireland",
"visits": 1541,
"actions": 5053,
"actions_per_visit": 3.3,
"avg_visit_duration": 117,
"bounce_rate_pct": 48.6,
"conversions": 24,
"conversion_rate_pct": 1.56,
"revenue": 2897.08,
"share_pct": 13.9,
"previous": {
"visits": 1431,
"actions": 5048,
"actions_per_visit": 3.5,
"avg_visit_duration": 126,
"bounce_rate_pct": 45.4,
"conversions": 26,
"conversion_rate_pct": 1.82,
"revenue": 3033.72
}
}
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": "2",
"total": 5,
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
country_code | string | ISO 3166-1 alpha-2, lowercase (nl); xx when unknown. |
country | string | The country in English. |
visits | integer | Visits. |
actions | integer | Actions (pageviews, downloads, outlinks, site searches). |
actions_per_visit | number or null | Actions per visit; null without visits. |
avg_visit_duration | integer or null | Average visit duration in seconds; null without visits. |
bounce_rate_pct | number or null | Visits with one action, 0-100; null without visits. |
conversions | integer | Visits that converted a goal (or placed an order). |
conversion_rate_pct | number or null | Converted visits as a share of visits, 0-100; null without visits. |
revenue | number | Revenue from goals and orders, in the currency of the Matomo site (meta.currency). |
share_pct | number or null | Share of the visits of the whole list, 0-100. |
previous | object or null | The same figures in the previous period; null when it did not occur then. |
previous.visits | integer | Visits. |
previous.actions | integer | Actions (pageviews, downloads, outlinks, site searches). |
previous.actions_per_visit | number or null | Actions per visit; null without visits. |
previous.avg_visit_duration | integer or null | Average visit duration in seconds; null without visits. |
previous.bounce_rate_pct | number or null | Visits with one action, 0-100; null without visits. |
previous.conversions | integer | Visits that converted a goal (or placed an order). |
previous.conversion_rate_pct | number or null | Converted visits as a share of visits, 0-100; null without visits. |
previous.revenue | number | Revenue from goals and orders, in the currency of the Matomo site (meta.currency). |
matomo.devices
POST /rest/v1/matomo.devices · MCP tool get_matomo_devices
Returns the visits of one site per device (mobile, desktop, tablet, other) in the period, most visits first, with the previous period. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
limit | integer, 1 to 500, default 100 | Items per call. |
cursor | string | meta.next_cursor of the previous call, for the next page. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.devices \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28}'
Example response · Sample figures of a made-up web shop.
{
"data": [
{
"device": "mobile",
"visits": 6734,
"actions": 22880,
"actions_per_visit": 3.4,
"avg_visit_duration": 121,
"bounce_rate_pct": 47,
"conversions": 116,
"conversion_rate_pct": 1.72,
"revenue": 13699.45,
"share_pct": 59.1,
"previous": {
"visits": 6027,
"actions": 20135,
"actions_per_visit": 3.3,
"avg_visit_duration": 119,
"bounce_rate_pct": 47.7,
"conversions": 101,
"conversion_rate_pct": 1.68,
"revenue": 11824.8
}
},
{
"device": "desktop",
"visits": 4107,
"actions": 17726,
"actions_per_visit": 4.3,
"avg_visit_duration": 154,
"bounce_rate_pct": 37,
"conversions": 87,
"conversion_rate_pct": 2.12,
"revenue": 10267.5,
"share_pct": 36.1,
"previous": {
"visits": 3607,
"actions": 16162,
"actions_per_visit": 4.5,
"avg_visit_duration": 160,
"bounce_rate_pct": 35.7,
"conversions": 80,
"conversion_rate_pct": 2.22,
"revenue": 9486.41
}
},
{
"device": "tablet",
"visits": 550,
"actions": 2383,
"actions_per_visit": 4.3,
"avg_visit_duration": 155,
"bounce_rate_pct": 36.9,
"conversions": 12,
"conversion_rate_pct": 2.18,
"revenue": 1413.5,
"share_pct": 4.8,
"previous": {
"visits": 508,
"actions": 2213,
"actions_per_visit": 4.4,
"avg_visit_duration": 156,
"bounce_rate_pct": 36.2,
"conversions": 11,
"conversion_rate_pct": 2.17,
"revenue": 1259.84
}
}
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": null,
"total": 3,
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
device | string | mobile (smartphones and phablets), desktop, tablet or other (tv, console, car, …). |
visits | integer | Visits. |
actions | integer | Actions (pageviews, downloads, outlinks, site searches). |
actions_per_visit | number or null | Actions per visit; null without visits. |
avg_visit_duration | integer or null | Average visit duration in seconds; null without visits. |
bounce_rate_pct | number or null | Visits with one action, 0-100; null without visits. |
conversions | integer | Visits that converted a goal (or placed an order). |
conversion_rate_pct | number or null | Converted visits as a share of visits, 0-100; null without visits. |
revenue | number | Revenue from goals and orders, in the currency of the Matomo site (meta.currency). |
share_pct | number or null | Share of the visits of the whole list, 0-100. |
previous | object or null | The same figures in the previous period; null when it did not occur then. |
previous.visits | integer | Visits. |
previous.actions | integer | Actions (pageviews, downloads, outlinks, site searches). |
previous.actions_per_visit | number or null | Actions per visit; null without visits. |
previous.avg_visit_duration | integer or null | Average visit duration in seconds; null without visits. |
previous.bounce_rate_pct | number or null | Visits with one action, 0-100; null without visits. |
previous.conversions | integer | Visits that converted a goal (or placed an order). |
previous.conversion_rate_pct | number or null | Converted visits as a share of visits, 0-100; null without visits. |
previous.revenue | number | Revenue from goals and orders, in the currency of the Matomo site (meta.currency). |
matomo.goals
POST /rest/v1/matomo.goals · MCP tool get_matomo_goals
Returns the goals of the Matomo site, and the orders when it is a web shop, with conversions, revenue and conversion rate in the period against the previous period. Empty when the Matomo site has no goals and no shop. The period runs up to yesterday at the latest; meta.period gives it and the previous period. Fails with 409 not_connected when Matomo is not connected for the site (or the token stopped working), 409 no_account when no Matomo site is chosen, 502 matomo_error when the Matomo installation fails.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days. |
days | integer, 1 to 366, default 28 | Without from and to: the last this many days up to yesterday. Defaults to 28. |
compare | one of previous_period, previous_year | What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period. |
limit | integer, 1 to 500, default 100 | Items per call. |
cursor | string | meta.next_cursor of the previous call, for the next page. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.goals \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","days":28}'
Example response · Sample figures of a made-up web shop.
{
"data": [
{
"goal_id": "ecommerceOrder",
"goal": "Ecommerce orders",
"ecommerce": true,
"conversions": 168,
"visits_converted": 168,
"revenue": 19817.85,
"conversion_rate_pct": 1.5,
"previous": {
"conversions": 152,
"visits_converted": 152,
"revenue": 17942.78,
"conversion_rate_pct": 1.5
}
},
{
"goal_id": "1",
"goal": "Newsletter sign-up",
"ecommerce": false,
"conversions": 128,
"visits_converted": 128,
"revenue": 0,
"conversion_rate_pct": 1.14,
"previous": {
"conversions": 93,
"visits_converted": 93,
"revenue": 0,
"conversion_rate_pct": 0.92
}
},
{
"goal_id": "2",
"goal": "Contact form",
"ecommerce": false,
"conversions": 38,
"visits_converted": 38,
"revenue": 0,
"conversion_rate_pct": 0.34,
"previous": {
"conversions": 34,
"visits_converted": 34,
"revenue": 0,
"conversion_rate_pct": 0.34
}
}
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": null,
"total": 3,
"period": {
"from": "2026-10-18",
"to": "2026-11-14",
"compare_from": "2026-09-20",
"compare_to": "2026-10-17"
},
"currency": "EUR"
}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
goal_id | string | The goal id in Matomo, or ecommerceOrder for the orders. |
goal | string | The goal name. |
ecommerce | boolean | Whether this is the orders of the web shop. |
conversions | integer | Conversions. |
visits_converted | integer | Visits that converted. |
revenue | number | Revenue. |
conversion_rate_pct | number | Converted visits as a share of all visits, 0-100. |
previous | object or null | The same in the previous period; null when there were none. |
previous.conversions | integer | Conversions. |
previous.visits_converted | integer | Visits that converted. |
previous.revenue | number | Revenue. |
previous.conversion_rate_pct | number | Conversion rate. |
matomo.sites
POST /rest/v1/matomo.sites · MCP tool get_matomo_sites
Returns the Matomo connection of the site: whether a Matomo installation is connected, its address, the chosen Matomo site, and every site the token can view (to choose one with matomo.site_set). The token itself is never returned.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.sites \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID"}'
Example response ·
{
"data": {
"connected": true,
"url": "https://stats.example.com",
"matomo_site_id": 1,
"sites": [
{
"matomo_site_id": 1,
"name": "Example shop",
"main_url": "https://www.example.com",
"currency": "EUR",
"ecommerce": true
},
{
"matomo_site_id": 2,
"name": "Example blog",
"main_url": "https://blog.example.com",
"currency": "EUR",
"ecommerce": false
}
]
},
"meta": {"site_id": "YOUR_SITE_ID"}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
connected | boolean | Whether a Matomo installation is connected (and the token still works). |
url | string or null | The address of the installation. |
matomo_site_id | integer or null | The chosen Matomo site (idSite); null when none is chosen. |
sites | array | The sites the token can view. |
sites[].matomo_site_id | integer | The idSite in Matomo. |
sites[].name | string | Its name in Matomo. |
sites[].main_url | string or null | Its main address. |
sites[].currency | string or null | Its currency. |
sites[].ecommerce | boolean | Whether it is a web shop in Matomo. |
matomo.connect
POST /rest/v1/matomo.connect · MCP tool
Returns the sites the token can view after connecting a Matomo installation to the site with its address and an API token (Matomo: Personal › Security › Auth tokens; view access is enough). Then choose a site with matomo.site_set. Anyone on the site may connect, guests too.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
url (required) | string | The https address of the Matomo installation, e.g. https://stats.example.com. |
token (required) | string | A Matomo API token (auth token) with at least view access. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.connect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","url":"https://stats.example.com","token":"YOUR_MATOMO_TOKEN"}'
Example response · The token is never returned.
{
"data": {
"connected": true,
"url": "https://stats.example.com",
"sites": [
{
"matomo_site_id": 1,
"name": "Example shop",
"main_url": "https://www.example.com",
"currency": "EUR",
"ecommerce": true
},
{
"matomo_site_id": 2,
"name": "Example blog",
"main_url": "https://blog.example.com",
"currency": "EUR",
"ecommerce": false
}
]
},
"meta": {"site_id": "YOUR_SITE_ID"}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
connected | boolean | Always true. |
url | string | The address as stored. |
sites | array | The sites the token can view. |
sites[].matomo_site_id | integer | The idSite. |
sites[].name | string | Its name. |
sites[].main_url | string or null | Its main address. |
sites[].currency | string or null | Its currency. |
sites[].ecommerce | boolean | Whether it is a web shop. |
matomo.site_set
POST /rest/v1/matomo.site_set · MCP tool
Returns the chosen Matomo site after choosing which site of the connected installation belongs to this site (matomo.sites). Anyone on the site may do this.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
matomo_site_id (required) | integer | The idSite from matomo.sites. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.site_set \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","matomo_site_id":1}'
Example response ·
{
"data": {
"matomo_site_id": 1,
"name": "Example shop",
"main_url": "https://www.example.com",
"currency": "EUR"
},
"meta": {"site_id": "YOUR_SITE_ID"}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
matomo_site_id | integer | The Matomo site now in use. |
name | string | Its name. |
main_url | string or null | Its main address. |
currency | string or null | Its currency. |
matomo.disconnect
POST /rest/v1/matomo.disconnect · MCP tool
Returns connected false after disconnecting Matomo from the site (the address, the token and the chosen Matomo site). Anyone on the site may do this, like connecting.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/matomo.disconnect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID"}'
Example response · Disconnecting always answers this.
{"data": {"connected": false}, "meta": {"site_id": "YOUR_SITE_ID"}}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
connected | boolean | Always false. |
One white label key for every client's Matomo. On your own domain.
On your agency's white-label domain, the API and the MCP answer under your own hostname and branding. One white label key (mtw_…, 600 calls per minute) connects and reads Matomo across every client site in your account. Clients who log in as guests on their site can also paste their Matomo view token themselves.
Free 14-day trial
MarketingTracer smart A.I. tool shows you what you need to rank. Then we'll help you get it done.
- No credit card required
- No installation needed
- No strings attached
FAQ
Something else? Ask us.
How do I connect a client's Matomo installation?
In the app on the Matomo page, or through the REST API with matomo.connect. Pass the public https:// address of the self-hosted Matomo or Matomo Cloud installation and a Matomo auth token (created in Matomo under Personal › Security › Auth tokens) with at least view access. That call returns the sites the token can read. Then call matomo.site_set with the matomo_site_id to pick one.
Can MarketingTracer change anything in my client's Matomo?
No. Every call to Matomo is read-only, and view access on the Matomo token is enough. The token is sent as a POST parameter over HTTPS and is never returned by matomo.sites or any other endpoint.
How does the API count visits from ChatGPT, Gemini and Perplexity?
They appear in their own ai channel, which Matomo 5 tracks as a separate referrer type. Call matomo.channels for the totals on the ai row. Pass channel: "ai" to matomo.sources to see each assistant by name, and to matomo.landing_pages to see where those visitors entered and converted.
What date ranges and comparisons can I request?
Pass days (1 to 366, default 28, ending yesterday) or an explicit from and to in YYYY-MM-DD. Set compare to previous_period for the preceding period of the same length, or previous_year for the same weekdays 52 weeks earlier (for periods up to 364 days). Every list item includes its previous figures.
Which error codes should my integration handle?
not_connected (HTTP 409), no_account (409) and matomo_error (502). You get not_connected when Matomo is not connected for the site or the token was revoked. Calling a read endpoint before choosing a site with matomo.site_set, or after the token loses access to that site, returns no_account. A timeout or error from the client's Matomo server returns matomo_error.
What does the Matomo API cost, and what is the rate limit?
The API and MCP are included in every MarketingTracer plan at no extra cost. A personal key (mtk_…) allows 60 calls per minute across the API and MCP together; a white label key (mtw_…) allows 600 calls per minute. Each Matomo endpoint makes a single bulk request to the connected Matomo installation.