Connect Matomo to ChatGPT or Claude with Adport MCP
Ask ChatGPT or Claude which campaigns brought visitors to your Matomo site and how many reached a goal. Adport reads the site you select alongside your advertising accounts. Start with a goal you can recognize in Matomo before asking your assistant to interpret the numbers.
Find the site you want to report on
Open Matomo and select the website you manage. Record the instance address, site ID, reporting time zone and one familiar goal name. An agency can have two installations that both contain a site numbered 1. The instance address tells you which site that number belongs to. For a first read, pick a completed week you can also open in the Matomo dashboard.
Adport’s Matomo connection covers aggregate acquisition and configured goals. That makes it useful for questions like “Which paid campaigns brought demo requests?” Keep the approved ad account in the same Adport project if you intend to compare spend later. Connecting a Matomo site uses an analytics selection and leaves the project’s advertising account slots available.
Connect Matomo Cloud or a publicly reachable instance
In your Adport project, open Analytics & tracking, choose Add source, then Matomo. Enter the HTTPS instance address, including any installation subdirectory. Continue to Matomo and authorize read access. Select the sites for this project and enable the ones the assistant should see.
The OAuth route requires the Matomo OAuth 2.0 plugin and a confidential client registered for that instance. An administrator can use the exact callback shown by Adport during first-time setup. If your installation uses tokens instead, choose Auth token and supply a token for a Matomo user with view access to the intended sites. If a token exposes several sites, enable only the site for this project. A private-network instance can use the local connection below. Matomo OAuth authorization code flow.
Set up a local Matomo MCP connection for a private site
If the instance is reachable only from your network, run the Adport CLI on a machine with access to it. Supply MATOMO_URL and MATOMO_TOKEN_AUTH securely in that environment. The connection wizard verifies which sites the token can view. Claude Code can then launch the local MCP server.
adport connect matomo
adport doctor
claude mcp add --transport stdio adport -- adport mcp
For hosted ChatGPT or Claude, authorize the Adport project in the assistant setup instead. The ChatGPT connection guide and Claude setup guide cover those client steps. A successful assistant sign-in is a good point to check which sites the project actually exposes.
Verify one goal and one week of acquisition
List the Matomo sites enabled in this Adport project. For SITE_ID, use analytics_goals and show the goal IDs and names. After I choose a goal, use analytics_acquisition_report for the last complete week in site time. Show sessions and counts for that goal by source, medium and campaign. Include unresolved rows and follow all result pages.
For a CLI check on illustrative site 1, run adport tools run analytics_goals --input '{"provider":"matomo","account_id":"1"}'. Replace 1 with the site ID you selected. Match the returned goal ID with the one in Matomo. Select the same date range in both places. A campaign row with no recorded goal completions still contributes sessions. Keep that row when comparing total traffic with the dashboard. Write down the site, dates and goal ID alongside the result so a teammate can repeat it.
Work out why a site or dimension is missing
If the site is missing from the account list, check the Matomo user’s view access, the saved site selection and the assistant toggle in this project. Reconnecting to a different instance requires a fresh site selection. If the site is visible but campaign source or medium is missing, check the archive and tagging before changing account permissions.
Continue with the Matomo campaign tracking guide for an example that keeps incomplete campaign tags in the report. Adport documents the supported Matomo connections and reads.
Sources & further reading
Provider documentation for the setup and platform behavior described above.
- Matomo OAuth authorization code flowdeveloper.matomo.org
- Matomo Reporting APIdeveloper.matomo.org
- Adport’s Matomo connection guidegithub.com