← back to blog
    Berner SetterwallOctober 13, 20266 min read

    Piwik PRO Is Live in Cogny: Analytics Your Agent Can Query and Annotate

    Teams choose Piwik PRO when they want web analytics, tag management and consent handling in one place, with control over where the data lives. Until now that meant the agent that reads your ad accounts and Search Console had no view of what visitors did after the click.

    Piwik PRO is now a live MCP integration in Cogny. API credentials and your account address, and the agent reads traffic, pages, sources, campaigns, custom events and goal conversions for every site the credentials can see. It can also write the things that make analytics useful later: a goal for a new thank-you page, an annotation on the day a campaign launched.

    A note on names: this is Piwik PRO, the analytics suite at piwik.pro. Matomo, the open-source project that used to be called Piwik, is a different product with its own Cogny integration.


    TL;DR

    • Piwik PRO is live now, on every Cogny plan. Connect it from your workspace Settings → Cogny Managed MCPs.
    • 23 tools: 17 that read and 6 that write.
    • Reports: get_traffic_summary, get_pages, get_sources, get_campaigns, get_countries, get_devices, get_events, get_goal_conversions, and run_query for any other combination of Piwik PRO dimensions and metrics.
    • Setup you can read: get_account_info, list_apps, get_app, list_goals, list_annotations, list_custom_dimensions, list_tags, list_audiences.
    • Writes: create, update and delete for goals and annotations.
    • The credentials act as the Piwik PRO user who created them. View permission is enough for every report. Piwik PRO asks for manage permission or the owner role to set up goals.
    • 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_account_infoConfirm the connection and count the sites and apps the credentials can see
    list_apps, get_appList your sites and apps with their ids, and read one site's URLs, timezone and currency
    get_traffic_summarySessions, visitors, page views, bounce rate, average session time and goal conversions, as one total or per day, week or month
    get_pagesPage views, unique page views, entries, exits and page bounce rate per page URL or title
    get_sourcesWhere sessions came from: channel, source / medium, source, medium, referrer URL or keyword
    get_campaignsCampaign traffic by campaign name, content or id, with its source / medium
    get_countries, get_devicesSessions and goal conversions per country, and per device type, browser, operating system or device brand
    get_eventsCustom events by category, action and name, with counts and summed values
    get_goal_conversionsConversions and revenue per goal, for all goals or one, optionally per day, week or month
    run_queryAny other report: your choice of dimensions and metrics, with filters, sorting and paging
    list_goals, list_annotations, list_custom_dimensionsHow the site is set up today
    list_tags, list_audiencesThe Tag Manager tags on a site, and its Customer Data Platform audiences
    create_goal, update_goal, delete_goalGoals that match a page URL, page title, download, outlink or custom event
    create_annotation, update_annotation, delete_annotationNotes on the reporting timeline

    Every report takes a date range, either two dates or a relative one such as yesterday or last_7_days, and an optional filter, so the agent can ask the same question about one slice of traffic: only google / cpc, only smartphones, only pages under /blog.

    run_query is the open end. If Piwik PRO has a dimension or metric for it, the agent can ask for it: sessions by hour of day, revenue by source, entry pages for one campaign, a custom dimension you track yourself. list_custom_dimensions tells the agent which slot each of your custom dimensions reports under.

    Some things to ask:

    • "Compare last week's sessions and goal conversions with the four weeks before, and tell me which sources moved."
    • "Which campaigns sent the most sessions last month, and which of those converted on the demo goal?"
    • "Show the pages with the most entries from search engines and a page bounce rate over 70%."
    • "We launched the autumn campaign on Monday. Add an annotation so it shows up on the charts."
    • "Create a goal for sessions that reach /demo/thanks, worth 200 per conversion."

    How to connect it

    1. Log in to Piwik PRO and go to Menu → your email address.
    2. On the left, click API keys, then Create a key.
    3. Name the key, for example "Cogny", and click OK.
    4. Copy the Client ID and the Client secret. The secret is shown only once.
    5. In your Cogny workspace, go to Settings → Cogny Managed MCPs, click Connect on the Piwik PRO card, and enter:
      • Your account address, usually https://yourcompany.piwik.pro
      • The Client ID and the Client secret

    The credentials are stored encrypted and are only ever sent to your own Piwik PRO account. Delete the key in Piwik PRO, 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.

    • Goals start counting when they are created. Piwik PRO does not apply a new goal to past sessions. A changed trigger or pattern applies from then on. A deleted goal stops counting and cannot be restored from Cogny.
    • Annotations are notes on a date. They are created private, visible only to the Piwik PRO user behind the credentials, unless the agent is asked to make one public, which shows it to everyone with access to the site. They are the cheapest way to make next quarter's analysis better: a chart with "pricing page redesigned" on it explains itself.

    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. There is no read-only credential: what the connection can change follows the permissions of the Piwik PRO user who created the API key. A key created by a user with only view permission on a site cannot change that site's goals, because Piwik PRO refuses it.

    The integration has no tools for adding or editing sites, users or permissions.


    What it does not cover yet

    Raw session and event logs, real-time reports, funnels, custom reports and dashboards have no tools today. Custom dimensions, Tag Manager tags and Customer Data Platform audiences can be listed but not created or changed. The full tool list, with what each tool reads or changes, is on the Piwik PRO tools page. If you need one of the missing pieces, ask your agent to request it: it can file the request itself from inside Cogny.


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