This documentation is for an outdated Matomo version.
Click here if you want to read this article for the latest version.
Click here if you want to read this article for the latest version.
- Ab Testing: Exposes the AbTesting API for managing experiments, embedding experiment scripts, and reading experiment reports.
- Actions: The Actions API lets you request reports for all your Visitor Actions: Page URLs, Page titles, Events, Content Tracking, File Downloads and Clicks on external websites. For example, "getPageTitles" will return all your page titles along with standard Actions metrics for each row. It is also possible to request data for a specific Page Title with "getPageTitle" and setting the parameter pageName to the page title you wish to request. Similarly, you can request metrics for a given Page URL via "getPageUrl", a Download file via "getDownload" and an outlink via "getOutlink". Note: pageName, pageUrl, outlinkUrl, downloadUrl parameters must be URL encoded before you call the API.
- Activity Log: Exposes Activity Log API endpoints for listing activity entries, counting matches, and resolving the permitted date range for the current caller.
- Advertising Conversion Export: Exposes API endpoints for managing advertising conversion export configurations. These methods let users list, inspect, create, update, and delete configured exports and access tokens.
- AI Agents: Provides reporting API methods for distinguishing AI agent traffic from human traffic.
- Annotations: Provides API methods to create, update, delete, and query annotations.
- API: This API is the Metadata API: it gives information about all other available APIs methods, as well as providing human readable and more complete outputs than normal API methods. Some of the information that is returned by the Metadata API: the dynamically generated list of all API methods via "getReportMetadata" the list of metrics that will be returned by each method, along with their human readable name, via "getDefaultMetrics" and "getDefaultProcessedMetrics" the list of segments metadata supported by all functions that have a 'segment' parameter the (truly magic) method "getProcessedReport" will return a human readable version of any other report, and include the processed metrics such as conversion rate, time on site, etc. which are not directly available in other methods. the method "getSuggestedValuesForSegment" returns top suggested values for a particular segment. It uses the Live.getLastVisitsDetails API to fetch the most recently used values, and will return the most often used values first. The Metadata API is for example used by the Matomo Mobile App to automatically display all Matomo reports, with translated report & columns names and nicely formatted values. More information on the Metadata API documentation page
- Bandwidth: Exposes reporting API endpoints for aggregated bandwidth metrics.
- Bot Tracking: Provides API methods for bot and AI chatbot reporting.
- Cohorts: Exposes cohort reports grouped by the period of a visitor's first visit. These endpoints transform archived first-visit cohort data into table and chart responses for the Cohorts plugin.
- Contents: The Contents API exposes content tracking reports grouped by content name and content piece.
- Core Admin Home: Provides administrative API methods for scheduling, archiving, tracking failures, and opt-out code generation.
- Core Plugins Admin: Provides API methods for reading and updating plugin settings.
- Crash Analytics: Exposes Crash Analytics endpoints for managing tracked crashes and querying crash reports. Includes summary, drill-down, historical, and realtime reporting APIs for a single site.
- Custom Alerts: Exposes Custom Alerts API endpoints for managing alert definitions and reading triggered alert data. These methods let callers create, update, fetch, delete, and evaluate alerts for one or more sites.
- Custom Dimensions: The Custom Dimensions API lets you manage and access reports for your configured Custom Dimensions.
- Custom Js Tracker: Provides API methods for custom JavaScript tracker configuration.
- Custom Reports: Exposes Custom Reports configuration and reporting endpoints. Use it to create, duplicate, manage, and query custom report definitions and their archived data.
- Custom Variables: Exposes reporting API endpoints for Custom Variables names, values, and slot usage.
- Dashboard: The Dashboard API lets you manage user dashboards and retrieve their widget configurations.
- Device Plugins: The DevicePlugins API lets you access reports about device plugins such as browser plugins.
- Devices Detection: The DevicesDetection API lets you access reports about your visitors' device types, brands, models, operating systems, and browsers.
- Events: The Events API lets you request reports about your users' Custom Events. Events are tracked using the Javascript Tracker trackEvent() function, or using the [Tracking HTTP API](https://developer.matomo.org/api-reference/tracking-api). An event is defined by an event category (Videos, Music, Games...), an event action (Play, Pause, Duration, Add Playlist, Downloaded, Clicked...), and an optional event name (a movie name, a song title, etc.) and an optional numeric value. This API exposes the following Custom Events reports: getCategory lists the top Event Categories, getAction lists the top Event Actions, getName lists the top Event Names. These Events report define the following metrics: nb_uniq_visitors, nb_visits, nb_events. If you define values for your events, you can expect to see the following metrics: nb_events_with_value, sum_event_value, min_event_value, max_event_value, avg_event_value The Events.get* reports can be used with an optional &secondaryDimension parameter. Secondary dimension is the dimension used in the sub-table of the Event report you are requesting. Here are the possible values of secondaryDimension: For Events.getCategory you can set secondaryDimension to eventAction or eventName. For Events.getAction you can set secondaryDimension to eventName or eventCategory. For Events.getName you can set secondaryDimension to eventAction or eventCategory. For example, to request all Custom Events Categories, and for each, the top Event actions, you would request: method=Events.getCategory&secondaryDimension=eventAction&flat=1. You may also omit &flat=1 in which case, to get top Event actions for one Event category, use method=Events.getActionFromCategoryId passing it the &idSubtable= of this Event category.
- Feedback: Provides API methods for submitting product feedback and managing feedback reminders.
- Form Analytics: Exposes the Form Analytics API for managing tracked forms and retrieving form performance reports. Use these endpoints to create, update, archive, and delete configured forms, inspect form metadata, and query aggregated reports about form usage, field interactions, conversions, and real-time activity.
- Funnels: Exposes the Funnels reporting and management API for funnel analytics configuration. Includes endpoints for funnel reports, funnel definitions, and pattern validation helpers.
- Goals: Goals API lets you Manage existing goals, via "updateGoal" and "deleteGoal", create new Goals via "addGoal", or list existing Goals for one or several websites via "getGoals" If you are tracking Ecommerce orders and products on your site, the functions "getItemsSku", "getItemsName" and "getItemsCategory" will return the list of products purchased on your site, either grouped by Product SKU, Product Name or Product Category. For each name, SKU or category, the following metrics are returned: Total revenue, Total quantity, average price, average quantity, number of orders (or abandoned carts) containing this product, number of visits on the Product page, Conversion rate. By default, these functions return the 'Products purchased'. These functions also accept an optional parameter &abandonedCarts=1. If the parameter is set, it will instead return the metrics for products that were left in an abandoned cart therefore not purchased. The API also lets you request overall Goal metrics via the method "get": Conversions, Visits with at least one conversion, Conversion rate and Revenue. If you wish to request specific metrics about Ecommerce goals, you can set the parameter &idGoal=ecommerceAbandonedCart to get metrics about abandoned carts (including Lost revenue, and number of items left in the cart) or &idGoal=ecommerceOrder to get metrics about Ecommerce orders (number of orders, visits with an order, subtotal, tax, shipping, discount, revenue, items ordered) See also the documentation about Tracking Goals in Matomo.
- Heatmap Session Recording: API for plugin Heatmap & Session Recording. When you request activity data for a heatmap or a recorded session, please note that any X or Y coordinate, scroll reach position, and above the fold is relative and not absolute. X and Y coordinate are between 0 and 2000 and are relative to the selector where 2000 means the position is at 100% of the element, 1000 means the position is at 50% and 0 means the position is actually 0 pixel from the element. Scroll and above the fold positions are between 0 and 1000. If for example a web page is 3000 pixel high, and scroll reach is 100, it means the user has seen the content up to 300 pixels (10%, or 100 of 1000). We differentiate between two different IDs here: idSiteHsr represents the ID of a heatmap or session recording configuration idLogHsr represents the ID of an actually recorded / tracked session or heatmap activity @OA\Tag(name="HeatmapSessionRecording")
- Image Graph: The ImageGraph.get API call lets you generate beautiful static PNG Graphs for any existing Matomo report. Supported graph types are: line plot, 2D/3D pie chart and vertical bar chart. A few notes about some of the parameters available: - $graphType defines the type of graph plotted, accepted values are: 'evolution', 'verticalBar', 'pie' and '3dPie' - $colors accepts a comma delimited list of colors that will overwrite the default Matomo colors - you can also customize the width, height, font size, metric being plotted (in case the data contains multiple columns/metrics). See also How to embed static Image Graphs? for more information.
- Insights: Provides API methods for insight and mover/shaker comparisons between report periods.
- Js Tracker Install Check: @internal
- Languages Manager: The LanguagesManager API lets you access existing Matomo translations, and change Users languages preferences. "getTranslationsForLanguage" will return all translation strings for a given language, so you can leverage Matomo translations in your application (and automatically benefit from the 40+ translations!). This is mostly useful to developers who integrate Matomo API results in their own application. You can also request the default language to load for a user via "getLanguageForUser", or update it via "setLanguageForUser".
- Live: The Live! API lets you access complete visit level information about your visitors. Combined with the power of Segmentation, you will be able to request visits filtered by any criteria. The method "getLastVisitsDetails" will return extensive RAW data for each visit, which includes: server time, visitId, visitorId, visitorType (new or returning), number of pages, list of all pages (and events, file downloaded and outlinks clicked), custom variables names and values set to this visit, number of goal conversions (and list of all Goal conversions for this visit, with time of conversion, revenue, URL, etc.), but also other attributes such as: days since last visit, days since first visit, country, continent, visitor IP, provider, referrer used (referrer name, keyword if it was a search engine, full URL), campaign name and keyword, operating system, browser, type of screen, resolution, supported browser plugins (flash, java, silverlight, pdf, etc.), various dates & times format to make it easier for API users... and more! With the parameter '&segment=' you can filter the returned visits by any criteria (visitor IP, visitor ID, country, keyword used, time of day, etc.). The method "getCounters" is used to return a simple counter: visits, number of actions, number of converted visits, in the last N minutes. See also the documentation about Real time widget and visitor level reports in Matomo. You may also be interested in steps to export your RAW data to a data warehouse.
- Login: Provides API methods for login-related administration tasks.
- Marketing Campaigns Reporting: Exposes reporting API endpoints for marketing campaign dimensions and drill-down reports. Includes campaign IDs, names, keywords, source and medium dimensions, and hierarchical subtables.
- Marketplace: The Marketplace API lets you manage your license key so you can download & install in one-click paid premium plugins you have subscribed to.
- Mcp Server
- Media Analytics: Exposes Media Analytics reports for video and audio plays, engagement, resources, and player usage. Includes real-time endpoints for recent activity and archive-backed endpoints for aggregated media reports.
- Mobile Messaging: The MobileMessaging API lets you manage SMS credentials, phone number verification, and SMS account settings.
- Multi Channel Conversion Attribution: Exposes the Multi-Channel Conversion Attribution management and reporting API. Provides endpoints to enable attribution for goals, inspect attribution-enabled goals for a site, list available campaign dimension combinations, and fetch channel attribution reports.
- Multi Sites: The MultiSites API lets you request the key metrics (visits, page views, revenue) for all Websites in Matomo.
- O Auth2: Exposes super-user OAuth2 client management endpoints for Matomo. This API lists configured scopes and lets administrators create, inspect, update, rotate, activate, and delete OAuth2 clients.
- Open Api Docs: Provides Reporting API endpoints for reading OpenAPI plugin configuration and specifications. Exposes endpoints to return the effective plugin list for spec generation, read pre-generated spec files, or generate plugin OpenAPI specifications on demand.
- Overlay: The Overlay API exposes translation data and overlay-specific page transition reports.
- Page Performance: Provides reporting API methods for aggregated page performance metrics.
- Privacy Manager: The PrivacyManager API lets you manage GDPR workflows, anonymization settings, and privacy compliance controls.
- Referrers: The Referrers API lets you access reports about websites, search engines, keywords, social networks, AI assistants, and campaigns used to access your website. For example, "getKeywords" returns all search engine keywords (with general analytics metrics for each keyword), "getWebsites" returns referrer websites (along with the full Referrer URL if the parameter &expanded=1 is set). "getReferrerType" returns the Referrer overview report. "getCampaigns" returns the list of all campaigns (and all campaign keywords if the parameter &expanded=1 is set). "getSocials" returns social network referrers, and "getAIAssistants" returns AI assistant referrers.
- Resolution: Provides API methods for screen resolution and device configuration reports.
- Roll Up Reporting: Provides API endpoints for managing roll-up websites and their source site assignments. Use these methods to create roll-ups, update their configuration, and list the configured roll-up sites with their assigned source websites.
- Scheduled Reports: The ScheduledReports API lets you manage Scheduled Email reports, as well as generate, download or email any existing report. "generateReport" will generate the requested report (for a specific date range, website and in the requested language). "sendReport" will send the report by email to the recipients specified for this report. You can also get the list of all existing reports via "getReports", create new reports via "addReport", or manage existing reports with "updateReport" and "deleteReport". See also the documentation about Scheduled Email reports in Matomo.
- Search Engine Keywords Performance: Provides SearchEngineKeywordsPerformance API endpoints for imported keyword and crawl-performance reports. Exposes combined and provider-specific reports for Google, Bing, and Yandex search data. \Plugins\SearchEngineKeywordsPerformance
- Segment Editor: The SegmentEditor API lets you add, update, delete custom Segments, and list saved segments.
- SEO: The SEO API lets you access a list of SEO metrics for the specified URL: Bing indexed pages and age of the Domain name.
- Sites Manager: The SitesManager API gives you full control on Websites in Matomo (create, update and delete), and many methods to retrieve websites based on various attributes. This API lets you create websites via "addSite", update existing websites via "updateSite" and delete websites via "deleteSite". When creating websites, it can be useful to access internal codes used by Matomo for currencies via "getCurrencyList", or timezones via "getTimezonesList". There are also many ways to request a list of websites: from the website ID via "getSiteFromId" or the site URL via "getSitesIdFromSiteUrl". Often, the most useful technique is to list all websites that are known to a current user, based on the token_auth, via "getSitesWithAdminAccess", "getSitesWithViewAccess" or "getSitesWithAtLeastViewAccess" (which returns both). Some methods will affect all websites globally: "setGlobalExcludedIps" will set the list of IPs to be excluded on all websites, "setGlobalExcludedQueryParameters" will set the list of URL parameters to remove from URLs for all websites. The existing values can be fetched via "getExcludedIpsGlobal" and "getExcludedQueryParametersGlobal". See also the documentation about Managing Websites in Matomo.
- Tag Manager: Exposes the Tag Manager API for managing containers, versions, tags, triggers, and variables. The endpoints also provide installation metadata, publishing workflows, preview controls, and import/export operations. A container may have several versions, and the current editable version is exposed as the "draft" version by {@link TagManager.getContainer}.
- Tour: Provides API methods for Tour challenges and engagement levels.
- Transitions: Provides API methods for transition reports around a specific page action.
- Two Factor Auth: Provides API methods for managing two-factor authentication.
- User Country: The UserCountry API lets you access reports about your visitors' Countries and Continents.
- User Id: Provides API methods for User ID reports.
- User Language: The UserLanguage API lets you access reports about your Visitors language setting
- Users Flow: Exposes Users Flow reports, drill-downs, and metadata for analyzing how visitors move through your website. Use this API to fetch formatted and raw flow reports, interaction-level actions, and supported data sources.
- Users Manager: The UsersManager API lets you Manage Users and their permissions to access specific websites. You can create users via "addUser", update existing users via "updateUser" and delete users via "deleteUser". There are many ways to list users based on their login "getUser" and "getUsers", their email "getUserByEmail", or which users have permission (view or admin) to access the specified websites "getUsersWithSiteAccess". Existing Permissions are listed given a login via "getSitesAccessFromUser", or a website ID via "getUsersAccessFromSite", or you can list all users and websites for a given permission via "getUsersSitesFromAccess". Permissions are set and updated via the method "setUserAccess". See also the documentation about Managing Users in Matomo.
- Visit Frequency: VisitFrequency API lets you access a list of metrics related to Returning Visitors.
- Visit Time: VisitTime API lets you access reports by Hour (Server time), and by Hour Local Time of your visitors.
- Visitor Interest: VisitorInterest API lets you access visitor engagement distribution reports, including visits by pages viewed, visit duration, days since last visit, and visit count.
- Visits Summary: VisitsSummary API lets you access the core web analytics metrics (visits, unique visitors, count of actions (page views & downloads & clicks on outlinks), time on site, bounces and converted visits.
Looking for the legacy API reference? The legacy API reference page is still available. Old reporting API links now redirect here. If anything is missing or behaving unexpectedly in this new version, please let us know so we can improve the experience.