← back to blog
    Berner SetterwallOctober 13, 20265 min read

    Matomo Is Live in Cogny: Web Analytics Your Agent Can Read and Annotate

    A lot of teams run Matomo because they want their web analytics on their own terms: on Matomo Cloud in the EU, or on a server they control. Until now that meant the agent that reads your ad accounts and Search Console had no view of what visitors did after the click.

    Matomo is now a live MCP integration in Cogny. It works with Matomo Cloud and with a Matomo you host yourself. One auth token and your Matomo URL, and the agent reads traffic, pages, referrers, events and goal conversions for every site the token can see. It can also write the things that make analytics useful later: an annotation on the day a campaign launched, a goal for a new thank-you page, a saved segment for campaign visitors.


    TL;DR

    • Matomo is live now, on every Cogny plan. Connect it from your workspace Settings → Cogny Managed MCPs.
    • 21 tools: 12 that read and 9 that write.
    • Reads: get_server_info, list_sites, get_visits_summary, get_page_urls, get_referrers, get_countries, get_device_types, get_events, get_goal_conversions, list_goals, list_annotations, list_segments.
    • Writes: create, update and delete for annotations, goals and segments.
    • Works with Matomo Cloud and self-hosted Matomo. A self-hosted Matomo has to be reachable from the internet over https.
    • The token has the permissions of the Matomo user who created it. View access is enough for every report. Goals need Write or Admin access on the site.
    • Reports return 100 rows by default and at most 1,000 per call.

    What you can do with it

    ToolWhat your agent can do
    get_server_infoConfirm the connection: Matomo version and how many sites the token can see
    list_sitesList your websites with their ids, URLs, timezone and currency
    get_visits_summaryVisits, unique visitors, actions, bounce rate and time on site for a day, week, month, year or any date range
    get_page_urlsPageviews, entries, exits, bounce rate and time per page
    get_referrersWhere visits came from: channel totals, referring websites, search engines, keywords, campaigns, social networks or AI assistants
    get_countries, get_device_typesVisits and conversions per country and per device type
    get_eventsTracked events by category, action or name, with counts and values
    get_goal_conversionsConversions, conversion rate and revenue for all goals or one
    list_goals, list_annotations, list_segmentsHow the site is set up today
    create_annotation, update_annotation, delete_annotationNotes on the reporting timeline
    create_goal, update_goal, delete_goalGoals that match a URL, page title, download, outlink or event
    create_segment, update_segment, delete_segmentSaved visitor segments

    Every report takes an optional segment, so the agent can ask the same question about one slice of traffic: referrerType==campaign for campaign visitors, countryCode==SE;deviceType==smartphone for Swedish mobile traffic.

    Some things to ask:

    • "Compare last week's visits and goal conversions with the four weeks before, and tell me which referrers moved."
    • "Which pages got the most entries from search engines last month, and which of those have a bounce rate over 70%?"
    • "How many visits did ChatGPT and Perplexity send us this quarter?" (get_referrers with report=ai_assistants, on Matomo versions that have the AI assistants report.)
    • "We launched the autumn campaign on Monday. Add an annotation so it shows up on the charts."
    • "Create a goal for visits that reach /demo/thanks, worth 200 per conversion."

    How to connect it

    1. Log in to Matomo and open Administration (the cog icon) → Personal → Security.
    2. Scroll to Auth tokens, click Create new token and confirm your password.
    3. Give it a description such as "Cogny", leave Only allow secure requests ticked, and copy the token. It is shown only once.
    4. In your Cogny workspace, go to Settings → Cogny Managed MCPs, click Connect on the Matomo card, and enter:
      • Your Matomo URL: https://yourcompany.matomo.cloud for Matomo Cloud, or the address your own Matomo is served from
      • The auth token

    The token is stored encrypted and is only ever sent to your own Matomo. Delete it in Matomo, or disconnect in Cogny, at any time.


    What the write tools change

    Reading is safe to hand over. Writing deserves a closer look, so here is exactly what each group does.

    • Annotations are notes on a date. Every Matomo user with access to the site sees them. They are the cheapest way to make next quarter's analysis better: a chart with "pricing page redesigned" on it explains itself.
    • Goals start counting when they are created. Matomo does not apply a new goal to past visits. Deleting a goal also removes its conversion reports, and it cannot be restored.
    • Segments are private to the token's user unless you share them with everyone. A segment with pre-processing turned on is faster to read and adds work for your Matomo server.

    Who approves a write depends on where it is called from. In the Cogny app, write tools are ask-first by default, so a person approves each one. When your own AI client calls a tool over MCP, your client is the approval step, so keep write tools set to ask every time there. Creating the token as a Matomo user with View access stops the goal tools, because Matomo refuses them. It does not make the connection fully read-only: with Matomo's default settings a View user can still add annotations and save segments of their own.

    The integration has no tools for adding or editing websites or users.


    What it does not cover yet

    The visitor log, ecommerce item reports, funnels, heatmaps, session recordings, A/B tests and Matomo Tag Manager have no tools today. The full tool list, with what each tool reads or changes, is on the Matomo tools page. If you need one of the missing reports, ask your agent to request it: it can file the request itself from inside Cogny.


    Matomo next to your ad platforms and Search Console, in one conversation, is what turns "traffic was up" into "this campaign sent these visits and they converted on this page". Connect Matomo from your Cogny dashboard and ask your first question.