How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Track Website Visitors And Campaigns While Owning Your Data With Matomo

December 2nd, 2026 · Kin Lane
Track Website Visitors And Campaigns While Owning Your Data With Matomo

If you want to know where your website visitors come from, which campaigns are working and where people drop out of your checkout, but you are uneasy about handing all of that data to someone else, or you have customers in Europe and need to take GDPR seriously, you are looking for web analytics you control. Matomo is built for exactly that, and every report it produces is available through an API, which means your own dashboards, spreadsheets or an AI assistant can pull the numbers directly instead of someone exporting them by hand. I keep a profile of what Matomo offers on APIs.io, and this is the version for the business reader.

What Matomo does

Matomo is an open source web analytics platform that you can run on your own servers (Matomo On-Premise) or have Matomo host for you (Matomo Cloud). Either way, the point is that your organization owns its analytics data. It was formerly called Piwik, it positions itself as a privacy-first alternative to Google Analytics, and it includes tooling for GDPR, the European privacy regulation. You can find it at matomo.org.

One thing that is a little unusual: when you run Matomo yourself, the API lives on your own installation, not on a vendor’s servers. Your analytics and the way you query them stay with you.

What you can get done

Marketing Management

This is the question every marketer asks on Monday: which campaigns brought people in? If you tag your links with campaign details (the utm_ codes you see on the end of marketing links), Matomo can break traffic down by campaign, source and medium.

  • GET /index.php?module=API&method=MarketingCampaignsReporting.getName reports on campaigns by name, such as which one brought the most visits last month.
  • GET /index.php?module=API&method=MarketingCampaignsReporting.getSource shows which sources, like a newsletter or a social network, send the most visitors.
  • GET /index.php?module=API&method=MarketingCampaignsReporting.getMedium compares mediums, such as email against paid clicks.
  • GET /index.php?module=API&method=MarketingCampaignsReporting.getKeyword shows which campaign keywords bring the best traffic.

Product Usage Analytics

Pageviews only tell part of the story. Events capture the things people do, playing a video, downloading a file, clicking a button, and funnels track the steps toward a goal, like a checkout, and where people give up.

  • GET /index.php?module=API&method=Events.getCategory shows which event categories happen most on your site.
  • GET /index.php?module=API&method=Events.getAction shows which actions, like play or download, happen most often.
  • GET /index.php?module=API&method=Funnels.getMetrics returns the conversion metrics of a funnel, such as your checkout.
  • GET /index.php?module=API&method=Funnels.getFunnelsSummary compares your funnels to show which converts best.

A/B Test Execution

An A/B test shows different versions of a page to different visitors and measures which one does better. Running them through the API means you can set up and report on experiments from your own tools.

  • GET /index.php?module=API&method=AbTesting.addExperiment sets up a new test with its variations and success metrics.
  • GET /index.php?module=API&method=AbTesting.startExperiment launches a test, and GET /index.php?module=API&method=AbTesting.finishExperiment ends it.
  • GET /index.php?module=API&method=AbTesting.getMetricsOverview shows which variation is winning so far.

Privacy & Data Protection Management

Under GDPR, a person can ask for a copy of the data you hold about them or ask you to delete it. These operations make it possible to answer those requests quickly, and to anonymize data you have already collected.

  • GET /index.php?module=API&method=PrivacyManager.findDataSubjects finds all the visits belonging to the person making the request.
  • GET /index.php?module=API&method=PrivacyManager.exportDataSubjects exports a copy of their data.
  • GET /index.php?module=API&method=PrivacyManager.deleteDataSubjects deletes it, honoring a right-to-erasure request.
  • GET /index.php?module=API&method=PrivacyManager.anonymizeSomeRawData anonymizes data already tracked, such as IP addresses.

There is more in the catalog, including search keyword reporting, custom reports and crash analytics.

Ask for it in plain language

We publish conversational phrasing overlays for Matomo. An overlay maps plain-language questions to the API operations that answer them, so an AI assistant knows which call to make. These are the kinds of questions it connects to the operations above:

  • Which marketing campaign brought the most visits last month in Matomo?
  • Does email or cpc perform better as a campaign medium?
  • What was the overall conversion rate of my checkout funnel last month?
  • Which variation is winning my A/B test so far?
  • How do I honor a GDPR right-to-erasure request for a visitor?

You can see one in the A/B Testing API phrasing overlay.

Getting started

Matomo is open source and free to run On-Premise, with a paid Cloud option and a public demo instance to look around. The Cloud Business plan is listed at 29 per month (excl. tax); the rest is in the pricing section of the Matomo profile.

Matomo’s documentation covers the Reporting API, the Tracking API for sending visits and events in from your own systems, and the Live data for what is happening right now. On APIs.io, start from the Matomo profile, then the Reporting API entrypoint, the Tracking API and the Actions API.

Start by tagging your next campaign’s links consistently; every report above gets better from there.