Oops… there was a problem during the request. Maybe the server had a temporary issue, or maybe you requested a report with too much data. Please try again. If this error occurs repeatedly please contact your Matomo administrator for assistance.

Need more help? Community Help – Professional Help.

All the data in Matomo is available through simple APIs. This plugin is the web-service entry point, that you can call to get your web analytics data in XML, JSON, PHP, CSV, etc.

More info about the Matomo APIs available in Introduction to Matomo API and the Matomo API Reference.

If you want to request data within a script, a crontab, etc. you need to add the 'token_auth' URL parameter to the API calls for URLs that require authentication. Learn more

You can manage your authentication tokens on your security page.

Provides reporting API methods for distinguishing AI agent traffic from human traffic.
- AIAgents.get (idSite, string period, string date, string segment = '', columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
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
- API.getMatomoVersion () [ Example in XML, Json, Tsv (Excel) ]
- API.getPhpVersion () [ Example in XML, Json, Tsv (Excel) ]
- API.getIpFromHeader () [ Example in XML, Json, Tsv (Excel) ]
- API.getSegmentsMetadata (idSites = 'Array') [ Example in XML, Json, Tsv (Excel) ]
- API.getMetadata (idSite, string apiModule, string apiAction, apiParameters = 'Array', language = '', period = '', date = '', hideMetricsDoc = '', showSubtableReports = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- API.getReportMetadata (idSites = '', period = '', date = '', hideMetricsDoc = '', showSubtableReports = '', idSite = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- API.getProcessedReport (idSite, period, date, apiModule, apiAction, segment = '', apiParameters = '', idGoal = '', language = '', showTimer = '1', hideMetricsDoc = '', idSubtable = '', showRawMetrics = '', format_metrics = '', idDimension = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- API.getReportPagesMetadata (idSite) [ Example in XML, Json, Tsv (Excel) ]
- API.getWidgetMetadata (idSite) [ Example in XML, Json, Tsv (Excel) ]
- API.get (idSite, period, date, segment = '', columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- API.getRowEvolution (idSite, period, date, apiModule, apiAction, label = '', segment = '', column = '', language = '', idGoal = '', legendAppendMetric = '1', labelUseAbsoluteUrl = '1', idDimension = '', labelSeries = '', showGoalMetricsForGoal = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- API.getBulkRequest (urls) [ No example available ]
- API.isPluginActivated (pluginName) [ No example available ]
- API.getSuggestedValuesForSegment (segmentName, idSite) [ Example in XML, Json, Tsv (Excel) ]
- API.getPagesComparisonsDisabledFor () [ Example in XML, Json, Tsv (Excel) ]
- API.getGlossaryReports (idSite) [ Example in XML, Json, Tsv (Excel) ]
- API.getGlossaryMetrics (idSite) [ Example in XML, Json, Tsv (Excel) ]
Exposes the AbTesting API for managing experiments, embedding experiment scripts, and reading experiment reports.
- AbTesting.getMetricsOverview (idSite, period, date, idExperiment, segment = '') [ No example available ]
- AbTesting.getMetricDetails (idSite, period, date, idExperiment, successMetric, segment = '') [ No example available ]
- AbTesting.addExperiment (idSite, name, hypothesis, description, variations, includedTargets, successMetrics) [ No example available ]
- AbTesting.updateExperiment (idExperiment, idSite, name, description, hypothesis, variations, confidenceThreshold, mdeRelative, percentageParticipants, successMetrics, includedTargets, excludedTargets = 'Array', startDate = '', endDate = '', forwardUtmParams = '', forwardAllQueryParams = '') [ No example available ]
- AbTesting.startExperiment (idExperiment, idSite) [ No example available ]
- AbTesting.finishExperiment (idExperiment, idSite) [ No example available ]
- AbTesting.archiveExperiment (idExperiment, idSite) [ No example available ]
- AbTesting.getJsIncludeTemplate () [ Example in XML, Json, Tsv (Excel) ]
- AbTesting.getJsExperimentTemplate (idExperiment, idSite) [ No example available ]
- AbTesting.getAllExperiments (idSite) [ Example in XML, Json, Tsv (Excel) ]
- AbTesting.getActiveExperiments (idSite) [ Example in XML, Json, Tsv (Excel) ]
- AbTesting.getExperimentsByStatuses (idSite, statuses) [ No example available ]
- AbTesting.getExperiment (idExperiment, idSite) [ No example available ]
- AbTesting.deleteExperiment (idExperiment, idSite) [ No example available ]
- AbTesting.getAvailableStatuses (idSite) [ Example in XML, Json, Tsv (Excel) ]
- AbTesting.getAvailableSuccessMetrics (idSite) [ Example in XML, Json, Tsv (Excel) ]
- AbTesting.getAvailableTargetAttributes () [ Example in XML, Json, Tsv (Excel) ]
- AbTesting.getExperimentsWithReports (idSite) [ Example in XML, Json, Tsv (Excel) ]
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.
- Actions.get (idSite, string period, string date, segment = '', columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getPageUrls (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '', depth = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getPageUrlsFollowingSiteSearch (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getPageTitlesFollowingSiteSearch (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getEntryPageUrls (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getExitPageUrls (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getPageUrl (pageUrl, idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getPageTitles (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getEntryPageTitles (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getExitPageTitles (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getPageTitle (pageName, idSite, string period, string date, segment = '') [ No example available ]
- Actions.getDownloads (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getDownload (downloadUrl, idSite, string period, string date, segment = '') [ No example available ]
- Actions.getOutlinks (idSite, string period, string date, segment = '', bool expanded = false, idSubtable = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getOutlink (outlinkUrl, idSite, string period, string date, segment = '') [ No example available ]
- Actions.getSiteSearchKeywords (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getSiteSearchNoResultKeywords (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Actions.getSiteSearchCategories (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Exposes Activity Log API endpoints for listing activity entries, counting matches, and resolving the permitted date range for the current caller.
- ActivityLog.getEntries (offset = '0', limit = '25', filterByUserLogin = '', filterByActivityType = '', period = '', date = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- ActivityLog.getEntryCount (filterByUserLogin = '', filterByActivityType = '', period = '', date = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- ActivityLog.getAllActivityTypes (filterLimit = '-1') [ Example in XML, Json, Tsv (Excel) ]
Exposes API endpoints for managing advertising conversion export configurations. These methods let users list, inspect, create, update, and delete configured exports and access tokens.
- AdvertisingConversionExport.getConversionExports (idSite = '') [ Example in XML, Json, Tsv (Excel) ]
- AdvertisingConversionExport.getConversionExport (idExport) [ No example available ]
- AdvertisingConversionExport.deleteConversionExport (idExport, idSite) [ No example available ]
- AdvertisingConversionExport.addConversionExport (idSite, name, type, parameters, description = '') [ No example available ]
- AdvertisingConversionExport.regenerateAccessToken (idExport) [ No example available ]
- AdvertisingConversionExport.updateConversionExport (idExport, idSite, name, type, parameters, description = '') [ No example available ]
Provides API methods to create, update, delete, and query annotations.
- Annotations.add (int idSite, string date, string note, bool starred = false) [ No example available ]
- Annotations.save (int idSite, int idNote, ?string date, ?string note, ?bool starred) [ No example available ]
- Annotations.delete (int idSite, int idNote) [ No example available ]
- Annotations.deleteAll (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- Annotations.get (int idSite, int idNote) [ No example available ]
- Annotations.getAll (string idSite, ?string date, string period = 'day', ?int lastN) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Annotations.getAnnotationCountForDates (string idSite, string date, string period, ?int lastN, bool getAnnotationText = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Provides API methods for bot and AI chatbot reporting.
- BotTracking.get (idSite, string period, string date, columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- BotTracking.getAIChatbotRequests (idSite, string period, string date, bool expanded = false, bool flat = false, ?string secondaryDimension) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- BotTracking.getAIChatbotsRealTime (idSite, lastMinutes = '30') [ Example in XML, Json, Tsv (Excel) ]
- BotTracking.getTopPageUrlsRealTime (idSite, lastMinutes = '30') [ Example in XML, Json, Tsv (Excel) ]
- BotTracking.getPageUrlsForAIChatbot (idSite, string period, string date, int idSubtable) [ No example available ]
- BotTracking.getDocumentUrlsForAIChatbot (idSite, string period, string date, int idSubtable) [ No example available ]
- BotTracking.getAIChatbotContentPages (idSite, string period, string date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- BotTracking.getAIChatbotContentDocuments (idSite, string period, string date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- BotTracking.getAIChatbotBrokenContent (idSite, string period, string date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- BotTracking.getAIChatbotHumanFavouredPages (idSite, string period, string date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- BotTracking.getAIChatbotAIFavouredPages (idSite, string period, string date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
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.
- Cohorts.getCohortsOverTime (idSite, period, displayDateRange, cohorts, segment = '', filter_limit = '') [ No example available ]
- Cohorts.getCohorts (idSite, period, date, metric = '', segment = '', filter_limit = '', formatMetics = 'all') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Cohorts.getByPeriodOfFirstVisit (idSite, cohorts, period, segment = '', periodsFromStart = '') [ No example available ]
The Contents API exposes content tracking reports grouped by content name and content piece.
- Contents.getContentNames (idSite, string period, string date, segment = '', idSubtable = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Contents.getContentPieces (idSite, string period, string date, segment = '', idSubtable = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Provides administrative API methods for scheduling, archiving, tracking failures, and opt-out code generation.
- CoreAdminHome.deleteAllTrackingFailures () [ Example in XML, Json, Tsv (Excel) ]
- CoreAdminHome.deleteTrackingFailure (int idSite, idFailure) [ No example available ]
- CoreAdminHome.getTrackingFailures () [ Example in XML, Json, Tsv (Excel) ]
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.
- CrashAnalytics.searchCrashMessagesForMerge (idSite, resourceUri = '', searchTerm = '', limit = '10', offset = '0', excludeIdLogCrashes = 'Array') [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.mergeCrashes (idSite, idLogCrashes) [ No example available ]
- CrashAnalytics.unmergeCrashGroup (idSite, idLogCrash) [ No example available ]
- CrashAnalytics.getCrashGroups (idSite) [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.getCrashTypes (idSite, filter_limit = '') [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.setIgnoreCrash (idSite, idLogCrash, ignore = '1') [ No example available ]
- CrashAnalytics.getIgnoredCrashes (idSite) [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.getCrashSummary (idSite, idLogCrash) [ No example available ]
- CrashAnalytics.getCrashVisitContext (idLogCrash, idSite, period, date, segment = '', filter_limit = '5', filter_offset = '0', fetchRecentActions = '1') [ No example available ]
- CrashAnalytics.getAllCrashes (idSite, filter_sort_column = 'datetime_last_seen', filter_sort_order = 'desc', filter_limit = '10', filter_offset = '0') [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.get (idSite, period, date, segment = '', columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getAllCrashMessages (idSite, period, date, segment = '', filter_pattern = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getCrashMessages (idSite, period, date, segment = '', filter_pattern = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getUnidentifiedCrashMessages (idSite, period, date, segment = '', filter_pattern = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getDisappearedCrashes (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getReappearedCrashes (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getNewCrashes (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getCrashesByPageUrl (idSite, period, date, segment = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getCrashesForPageUrl (idSite, period, date, idSubtable, segment = '') [ No example available ]
- CrashAnalytics.getCrashesByPageTitle (idSite, period, date, segment = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getCrashesForPageTitle (idSite, period, date, idSubtable, segment = '') [ No example available ]
- CrashAnalytics.getCrashesBySource (idSite, period, date, segment = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getCrashesForSource (idSite, period, date, idSubtable, segment = '') [ No example available ]
- CrashAnalytics.getCrashesByCategory (idSite, period, date, segment = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getCrashesForCategory (idSite, period, date, idSubtable, segment = '') [ No example available ]
- CrashAnalytics.getCrashesByFirstParty (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getCrashesByThirdParty (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CrashAnalytics.getLastCrashesOverview (idSite, segment = '', lastMinutes = '30') [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.getLastTopCrashes (idSite, segment = '', lastMinutes = '30', filter_limit = '5') [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.getLastNewCrashes (idSite, segment = '', lastMinutes = '30', filter_limit = '10') [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.getLastReappearedCrashes (idSite, segment = '', lastMinutes = '30', filter_limit = '10') [ Example in XML, Json, Tsv (Excel) ]
- CrashAnalytics.getLastDisappearedCrashes (idSite, segment = '', lastMinutes = '30', filter_limit = '10') [ Example in XML, Json, Tsv (Excel) ]
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.
- CustomAlerts.getValuesForAlertInPast (idAlert, subPeriodN) [ No example available ]
- CustomAlerts.getAlert (idAlert) [ Example in XML, Json, Tsv (Excel) ]
- CustomAlerts.getAlerts (idSites, ifSuperUserReturnAllAlerts = '') [ Example in XML, Json, Tsv (Excel) ]
- CustomAlerts.addAlert (name, idSites, period, emailMe, additionalEmails, phoneNumbers, metric, metricCondition, metricValue, comparedTo, reportUniqueId, reportCondition = '', reportValue = '', array reportMediums = 'Array', string slackChannelID = '', string msTeamsWebhookUrl = '', string description = '') [ No example available ]
- CustomAlerts.editAlert (idAlert, name, idSites, period, emailMe, additionalEmails, phoneNumbers, metric, metricCondition, metricValue, comparedTo, reportUniqueId, reportCondition = '', reportValue = '', array reportMediums = 'Array', string slackChannelID = '', string msTeamsWebhookUrl = '', string description = '') [ No example available ]
- CustomAlerts.deleteAlert (idAlert) [ Example in XML, Json, Tsv (Excel) ]
- CustomAlerts.getTriggeredAlerts (idSites) [ Example in XML, Json, Tsv (Excel) ]
The Custom Dimensions API lets you manage and access reports for your configured Custom Dimensions.
- CustomDimensions.getCustomDimension (int idDimension, int idSite, string period, string date, segment = '', bool expanded = false, bool flat = false, idSubtable = '') [ No example available ]
- CustomDimensions.configureNewCustomDimension (int idSite, string name, string scope, active, extractions = 'Array', caseSensitive = '1', string description = '') [ No example available ]
- CustomDimensions.configureExistingCustomDimension (int idDimension, int idSite, string name, active, extractions = 'Array', caseSensitive = '', ?string description) [ No example available ]
- CustomDimensions.getConfiguredCustomDimensions (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- CustomDimensions.getConfiguredCustomDimensionsHavingScope (int idSite, scope) [ No example available ]
- CustomDimensions.getAvailableScopes (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- CustomDimensions.getAvailableExtractionDimensions () [ Example in XML, Json, Tsv (Excel) ]
Provides API methods for custom JavaScript tracker configuration.
- CustomJsTracker.doesIncludePluginTrackersAutomatically () [ Example in XML, Json, Tsv (Excel) ]
Exposes Custom Reports configuration and reporting endpoints. Use it to create, duplicate, manage, and query custom report definitions and their archived data.
- CustomReports.duplicateCustomReport (int idSite, int idCustomReport, array idDestinationSites = 'Array') [ No example available ]
- CustomReports.addCustomReport (idSite, name, reportType, metricIds, categoryId = '', dimensionIds = 'Array', subcategoryId = '', description = '', segmentFilter = '', multipleIdSites = 'Array') [ No example available ]
- CustomReports.updateCustomReport (idSite, idCustomReport, name, reportType, metricIds, categoryId = '', dimensionIds = 'Array', subcategoryId = '', description = '', segmentFilter = '', subCategoryReportIds = 'Array', multipleIdSites = 'Array') [ No example available ]
- CustomReports.getConfiguredReports (idSite, skipCategoryMetadata = '') [ Example in XML, Json, Tsv (Excel) ]
- CustomReports.getConfiguredReport (idSite, idCustomReport) [ No example available ]
- CustomReports.deleteCustomReport (idSite, idCustomReport) [ No example available ]
- CustomReports.pauseCustomReport (idSite, idCustomReport) [ No example available ]
- CustomReports.resumeCustomReport (idSite, idCustomReport) [ No example available ]
- CustomReports.getAvailableCategories (idSite) [ Example in XML, Json, Tsv (Excel) ]
- CustomReports.getAvailableReportTypes () [ Example in XML, Json, Tsv (Excel) ]
- CustomReports.getAvailableDimensions (idSite) [ Example in XML, Json, Tsv (Excel) ]
- CustomReports.getAvailableMetrics (idSite) [ Example in XML, Json, Tsv (Excel) ]
- CustomReports.getCustomReport (idSite, period, date, idCustomReport, segment = '', expanded = '', flat = '', idSubtable = '', columns = '') [ No example available ]
Exposes reporting API endpoints for Custom Variables names, values, and slot usage.
- CustomVariables.getCustomVariables (idSite, period, date, segment = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- CustomVariables.getCustomVariablesValuesFromNameId (idSite, period, date, idSubtable, segment = '') [ No example available ]
- CustomVariables.getUsagesOfSlots (idSite) [ Example in XML, Json, Tsv (Excel) ]
The Dashboard API lets you manage user dashboards and retrieve their widget configurations.
- Dashboard.getDashboards (string login = '', bool returnDefaultIfEmpty = true) [ Example in XML, Json, Tsv (Excel) ]
- Dashboard.createNewDashboardForUser (string login, string dashboardName = '', bool addDefaultWidgets = true) [ No example available ]
- Dashboard.removeDashboard (int idDashboard, string login = '') [ No example available ]
- Dashboard.copyDashboardToUser (int idDashboard, string copyToUser, string dashboardName = '') [ No example available ]
- Dashboard.resetDashboardLayout (int idDashboard, string login = '') [ No example available ]
The DevicePlugins API lets you access reports about device plugins such as browser plugins.
- DevicePlugins.getPlugin (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
The DevicesDetection API lets you access reports about your visitors' device types, brands, models, operating systems, and browsers.
- DevicesDetection.getType (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- DevicesDetection.getBrand (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- DevicesDetection.getModel (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- DevicesDetection.getOsFamilies (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- DevicesDetection.getOsVersions (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- DevicesDetection.getBrowsers (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- DevicesDetection.getBrowserVersions (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- DevicesDetection.getBrowserEngines (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
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.
- Events.getCategory (idSite, string period, string date, segment = '', bool expanded = false, secondaryDimension = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Events.getAction (idSite, string period, string date, segment = '', bool expanded = false, secondaryDimension = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Events.getName (idSite, string period, string date, segment = '', bool expanded = false, secondaryDimension = '', bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Events.getActionFromCategoryId (idSite, string period, string date, idSubtable, segment = '') [ No example available ]
- Events.getNameFromCategoryId (idSite, string period, string date, idSubtable, segment = '') [ No example available ]
- Events.getCategoryFromActionId (idSite, string period, string date, idSubtable, segment = '') [ No example available ]
- Events.getNameFromActionId (idSite, string period, string date, idSubtable, segment = '') [ No example available ]
- Events.getActionFromNameId (idSite, string period, string date, idSubtable, segment = '') [ No example available ]
- Events.getCategoryFromNameId (idSite, string period, string date, idSubtable, segment = '') [ No example available ]
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.
- FormAnalytics.addForm (idSite, name, description = '', matchFormRules = '', matchPageRules = '', conversionRuleOption = 'page_visit', conversionRules = '', idGoal = '') [ No example available ]
- FormAnalytics.updateForm (idSite, idForm, name, description = '', matchFormRules = '', matchPageRules = '', conversionRuleOption = 'page_visit', conversionRules = '', idGoal = '') [ No example available ]
- FormAnalytics.getForm (idSite, idForm) [ No example available ]
- FormAnalytics.getForms (idSite) [ Example in XML, Json, Tsv (Excel) ]
- FormAnalytics.getFormsByStatuses (idSite, statuses) [ No example available ]
- FormAnalytics.deleteForm (idSite, idForm) [ No example available ]
- FormAnalytics.archiveForm (idSite, idForm) [ No example available ]
- FormAnalytics.get (idSite, period, date, idForm = '', segment = '', columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- FormAnalytics.getSummary (idSite, period, date, segment = '', columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- FormAnalytics.getEntryFields (idSite, period, date, idForm, segment = '') [ No example available ]
- FormAnalytics.getDropOffFields (idSite, period, date, idForm, segment = '') [ No example available ]
- FormAnalytics.getPageUrls (idSite, period, date, idForm, segment = '') [ No example available ]
- FormAnalytics.getFieldTimings (idSite, period, date, idForm, segment = '') [ No example available ]
- FormAnalytics.getFieldSize (idSite, period, date, idForm, segment = '') [ No example available ]
- FormAnalytics.getUneededFields (idSite, period, date, idForm, segment = '') [ No example available ]
- FormAnalytics.getMostUsedFields (idSite, period, date, idForm, segment = '') [ No example available ]
- FormAnalytics.getFieldCorrections (idSite, period, date, idForm, segment = '') [ No example available ]
- FormAnalytics.updateFormFieldDisplayName (idSite, idForm, fields = 'Array') [ No example available ]
- FormAnalytics.getCounters (idSite, lastMinutes, segment = '') [ Example in XML, Json, Tsv (Excel) ]
- FormAnalytics.getCurrentMostPopularForms (idSite, lastMinutes, filter_limit = '5', segment = '') [ Example in XML, Json, Tsv (Excel) ]
- FormAnalytics.getAutoCreationSettings (idSite) [ Example in XML, Json, Tsv (Excel) ]
- FormAnalytics.getAvailableStatuses () [ Example in XML, Json, Tsv (Excel) ]
- FormAnalytics.getAllGoals (idSite) [ Example in XML, Json, Tsv (Excel) ]
- FormAnalytics.getAvailableFormRules () [ Example in XML, Json, Tsv (Excel) ]
- FormAnalytics.getAvailablePageRules () [ Example in XML, Json, Tsv (Excel) ]
- FormAnalytics.getAvailableConversionRuleOptions () [ Example in XML, Json, Tsv (Excel) ]
Exposes the Funnels reporting and management API for funnel analytics configuration. Includes endpoints for funnel reports, funnel definitions, and pattern validation helpers.
- Funnels.getMetrics (idSite, period, date, idFunnel = '', idGoal = '', segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Funnels.getFunnelsSummary (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Funnels.getFunnelsSummaryTotals (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Funnels.getFunnelFlow (idSite, period, date, idFunnel = '', idGoal = '', segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Funnels.getFunnelFlowTable (idSite, period, date, idFunnel = '', idGoal = '', segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Funnels.getFunnelStepSubtable (idSite, period, date, stepPosition, idFunnel = '', idGoal = '', segment = '') [ No example available ]
- Funnels.getFunnelEntries (idSite, period, date, idFunnel, segment = '', step = '', expanded = '', idSubtable = '', flat = '') [ No example available ]
- Funnels.getFunnelExits (idSite, period, date, idFunnel, segment = '', step = '') [ No example available ]
- Funnels.getGoalFunnel (idSite, idGoal) [ No example available ]
- Funnels.getSalesFunnelForSite (idSite) [ Example in XML, Json, Tsv (Excel) ]
- Funnels.getFunnel (int idSite, int idFunnel) [ No example available ]
- Funnels.getAllActivatedFunnelsForSite (idSite) [ Example in XML, Json, Tsv (Excel) ]
- Funnels.hasAnyActivatedFunnelForSite (idSite) [ Example in XML, Json, Tsv (Excel) ]
- Funnels.deleteGoalFunnel (idSite, idGoal) [ No example available ]
- Funnels.deleteNonGoalFunnel (int idSite, int idFunnel) [ No example available ]
- Funnels.setGoalFunnel (idSite, idGoal, isActivated, steps = 'Array') [ No example available ]
- Funnels.saveNonGoalFunnel (int idSite, int idFunnel, string funnelName, array steps, ?string description) [ No example available ]
- Funnels.getAvailablePatternMatches () [ Example in XML, Json, Tsv (Excel) ]
- Funnels.testUrlMatchesSteps (url, steps) [ No example available ]
API for plugin GithubAnalytics.
- GithubAnalytics.getReportTemplatesMetadata (idSite) [ Example in XML, Json, Tsv (Excel) ]
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.
- Goals.getGoal (int idSite, int idGoal) [ No example available ]
- Goals.getGoals (idSite, bool orderByName = false) [ Example in XML, Json, Tsv (Excel) ]
- Goals.addGoal (int idSite, string name, matchAttribute, pattern, patternType, caseSensitive = '', revenue = '', allowMultipleConversionsPerVisit = '', string description = '', useEventValueAsRevenue = '') [ No example available ]
- Goals.updateGoal (int idSite, idGoal, string name, matchAttribute, pattern, patternType, caseSensitive = '', revenue = '', allowMultipleConversionsPerVisit = '', string description = '', useEventValueAsRevenue = '') [ No example available ]
- Goals.deleteGoal (int idSite, idGoal) [ No example available ]
- Goals.getItemsSku (idSite, string period, string date, abandonedCarts = '', segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Goals.getItemsName (idSite, string period, string date, abandonedCarts = '', segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Goals.getItemsCategory (idSite, string period, string date, abandonedCarts = '', segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Goals.get (idSite, string period, string date, segment = '', idGoal = '', columns = 'Array', showAllGoalSpecificMetrics = '', compare = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Goals.getDaysToConversion (idSite, string period, string date, segment = '', idGoal = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Goals.getVisitsUntilConversion (idSite, string period, string date, segment = '', idGoal = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Exposes the Heatmap & Session Recording API endpoints for managing configurations and retrieving recorded activity. Heatmap coordinates use relative values: X and Y positions range from 0 to 2000, where 1000 represents 50% of the matched element. Scroll reach and above-the-fold positions range from 0 to 1000, where 100 represents 10% of the page height. idSiteHsr identifies a heatmap or session recording configuration, while idLogHsr identifies an individual recorded activity entry.
- HeatmapSessionRecording.addHeatmap (idSite, name, matchPageRules, sampleLimit = '1000', sampleRate = '5', excludedElements = '', screenshotUrl = '', breakpointMobile = '', breakpointTablet = '', captureDomManually = '', description = '', bool autoRepeat = false) [ No example available ]
- HeatmapSessionRecording.duplicateHeatmap (int idSite, int idSiteHsr, array idDestinationSites = 'Array') [ No example available ]
- HeatmapSessionRecording.updateHeatmap (idSite, idSiteHsr, name, matchPageRules, sampleLimit = '1000', sampleRate = '5', excludedElements = '', screenshotUrl = '', breakpointMobile = '', breakpointTablet = '', captureDomManually = '', description = '', bool autoRepeat = false) [ No example available ]
- HeatmapSessionRecording.deleteHeatmapScreenshot (idSite, idSiteHsr, bool captureManually = false) [ No example available ]
- HeatmapSessionRecording.addSessionRecording (idSite, name, matchPageRules = 'Array', sampleLimit = '1000', sampleRate = '10', minSessionTime = '0', requiresActivity = '1', captureKeystrokes = '1', description = '', bool autoRepeat = false) [ No example available ]
- HeatmapSessionRecording.updateSessionRecording (idSite, idSiteHsr, name, matchPageRules = 'Array', sampleLimit = '1000', sampleRate = '10', minSessionTime = '0', requiresActivity = '1', captureKeystrokes = '1', description = '', bool autoRepeat = false) [ No example available ]
- HeatmapSessionRecording.getHeatmap (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.getSessionRecording (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.pauseHeatmap (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.resumeHeatmap (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.deleteHeatmap (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.endHeatmap (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.pauseSessionRecording (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.resumeSessionRecording (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.deleteSessionRecording (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.endSessionRecording (idSite, idSiteHsr) [ No example available ]
- HeatmapSessionRecording.getHeatmaps (idSite, includePageTreeMirror = '1') [ Example in XML, Json, Tsv (Excel) ]
- HeatmapSessionRecording.getSessionRecordings (idSite) [ Example in XML, Json, Tsv (Excel) ]
- HeatmapSessionRecording.getRecordedSessions (idSite, period, date, idSiteHsr, segment = '', idSubtable = '') [ No example available ]
- HeatmapSessionRecording.getRecordedSession (idSite, idSiteHsr, idLogHsr) [ No example available ]
- HeatmapSessionRecording.deleteRecordedSession (idSite, idSiteHsr, idVisit) [ No example available ]
- HeatmapSessionRecording.deleteRecordedPageview (idSite, idSiteHsr, idLogHsr) [ No example available ]
- HeatmapSessionRecording.getRecordedHeatmapMetadata (idSite, period, date, idSiteHsr, segment = '') [ No example available ]
- HeatmapSessionRecording.getRecordedHeatmap (idSite, period, date, idSiteHsr, heatmapType, deviceType, segment = '') [ No example available ]
- HeatmapSessionRecording.getEmbedSessionInfo (idSite, idSiteHsr, idLogHsr) [ No example available ]
- HeatmapSessionRecording.testUrlMatchPages (url, matchPageRules = 'Array') [ Example in XML, Json, Tsv (Excel) ]
- HeatmapSessionRecording.getAvailableStatuses () [ Example in XML, Json, Tsv (Excel) ]
- HeatmapSessionRecording.getAvailableTargetPageRules () [ Example in XML, Json, Tsv (Excel) ]
- HeatmapSessionRecording.getAvailableDeviceTypes () [ Example in XML, Json, Tsv (Excel) ]
- HeatmapSessionRecording.getAvailableHeatmapTypes () [ Example in XML, Json, Tsv (Excel) ]
- HeatmapSessionRecording.getAvailableSessionRecordingSampleLimits (?int idSite) [ Example in XML, Json, Tsv (Excel) ]
- HeatmapSessionRecording.getEventTypes () [ Example in XML, Json, Tsv (Excel) ]
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.
- ImageGraph.get (int idSite, string period, string date, string apiModule, string apiAction, graphType = '', int outputType = '0', columns = '', labels = '', bool showLegend = true, width = '', height = '', int fontSize = '9', legendFontSize = '', bool aliasedGraph = true, idGoal = '', colors = '', string textColor = '222222', string backgroundColor = 'FFFFFF', string gridColor = 'CCCCCC', idSubtable = '', bool legendAppendMetric = true, segment = '', idDimension = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Provides API methods for insight and mover/shaker comparisons between report periods.
- Insights.canGenerateInsights (string date, string period) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Insights.getInsightsOverview (int idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Insights.getMoversAndShakersOverview (int idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Insights.getMoversAndShakers (int idSite, string period, string date, string reportUniqueId, segment = '', comparedToXPeriods = '1', limitIncreaser = '4', limitDecreaser = '4') [ No example available ]
- Insights.getInsights (int idSite, string period, string date, string reportUniqueId, segment = '', limitIncreaser = '5', limitDecreaser = '5', string filterBy = '', minImpactPercent = '2', minGrowthPercent = '20', comparedToXPeriods = '1', string orderBy = 'absolute') [ No example available ]
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".
- LanguagesManager.isLanguageAvailable (string languageCode) [ Example in XML, Json, Tsv (Excel) ]
- LanguagesManager.getAvailableLanguages () [ Example in XML, Json, Tsv (Excel) ]
- LanguagesManager.getAvailableLanguagesInfo (bool excludeNonCorePlugins = true) [ Example in XML, Json, Tsv (Excel) ]
- LanguagesManager.getAvailableLanguageNames () [ Example in XML, Json, Tsv (Excel) ]
- LanguagesManager.getTranslationsForLanguage (string languageCode) [ Example in XML, Json, Tsv (Excel) ]
- LanguagesManager.getLanguageForUser (string login) [ No example available ]
- LanguagesManager.setLanguageForUser (string login, string languageCode) [ No example available ]
- LanguagesManager.uses12HourClockForUser (string login) [ No example available ]
- LanguagesManager.set12HourClockForUser (string login, bool use12HourClock) [ No example available ]
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.
- Live.getCounters (idSite, int lastMinutes, segment = '', showColumns = 'Array', hideColumns = 'Array') [ Example in XML, Json, Tsv (Excel) ]
- Live.isVisitorProfileEnabled (idSite) [ Example in XML, Json, Tsv (Excel) ]
- Live.getLastVisitsDetails (idSite, period = '', date = '', segment = '', countVisitorsToFetch = '', minTimestamp = '', flat = '', doNotFetchActions = '', enhanced = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Live.getVisitorProfile (int idSite, visitorId = '', segment = '', limitVisits = '') [ Example in XML, Json, Tsv (Excel) ]
- Live.getMostRecentVisitorId (int idSite, segment = '') [ Example in XML, Json, Tsv (Excel) ]
- Live.getMostRecentVisitsDateTime (idSite, ?string period, ?string date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
API endpoints for browsing Matomo log entries and log reader settings.
- LogViewer.getLogEntries (query = '', source = '', page = '0', limitPerPage = '10') [ Example in XML, Json, Tsv (Excel) ]
- LogViewer.getAvailableLogReaders () [ Example in XML, Json, Tsv (Excel) ]
- LogViewer.getConfiguredLogReaders () [ Example in XML, Json, Tsv (Excel) ]
- LogViewer.getLogConfig () [ Example in XML, Json, Tsv (Excel) ]
Exposes LoginSaml API endpoints for plugin configuration and SSO onboarding. Includes configuration persistence, IdP metadata import, and user invitation workflows.
- LoginSaml.saveSamlConfig (data) [ No example available ]
- LoginSaml.importIdPMetadata (data) [ No example available ]
- LoginSaml.inviteUser (string userLogin, string email, int initialIdSite, bool shouldSetPassword, ?int expiryInDays, ?string passwordConfirmation) [ No example available ]
Provides API methods for login-related administration tasks.
- Login.unblockBruteForceIPs () [ Example in XML, Json, Tsv (Excel) ]
Exposes reporting API endpoints for marketing campaign dimensions and drill-down reports. Includes campaign IDs, names, keywords, source and medium dimensions, and hierarchical subtables.
- MarketingCampaignsReporting.getId (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getName (idSite, period, date, segment = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getKeywordContentFromNameId (idSite, period, date, idSubtable, segment = '') [ No example available ]
- MarketingCampaignsReporting.getKeyword (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getSource (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getMedium (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getContent (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getGroup (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getPlacement (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getSourceMedium (idSite, period, date, segment = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MarketingCampaignsReporting.getNameFromSourceMediumId (idSite, period, date, idSubtable, segment = '') [ No example available ]
The Marketplace API lets you manage your license key so you can download & install in one-click paid premium plugins you have subscribed to.
- Marketplace.deleteLicenseKey () [ No example available ]
- Marketplace.saveLicenseKey (string licenseKey) [ No example available ]
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.
- MediaAnalytics.hasRecords (idSite) [ Example in XML, Json, Tsv (Excel) ]
- MediaAnalytics.get (idSite, period, date, segment = '', columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getCurrentNumPlays (idSite, lastMinutes, segment = '') [ Example in XML, Json, Tsv (Excel) ]
- MediaAnalytics.getCurrentSumTimeSpent (idSite, lastMinutes, segment = '') [ Example in XML, Json, Tsv (Excel) ]
- MediaAnalytics.getCurrentMostPlays (idSite, lastMinutes, filter_limit = '5', segment = '') [ Example in XML, Json, Tsv (Excel) ]
- MediaAnalytics.getVideoResources (idSite, period, date, segment = '', idSubtable = '', secondaryDimension = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getAudioResources (idSite, period, date, segment = '', idSubtable = '', secondaryDimension = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getVideoTitles (idSite, period, date, segment = '', idSubtable = '', secondaryDimension = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getAudioTitles (idSite, period, date, segment = '', idSubtable = '', secondaryDimension = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getGroupedVideoResources (idSite, period, date, segment = '', idSubtable = '', secondaryDimension = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getGroupedAudioResources (idSite, period, date, segment = '', idSubtable = '', secondaryDimension = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getVideoHours (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getAudioHours (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getVideoResolutions (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MediaAnalytics.getPlayers (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
The MobileMessaging API lets you manage SMS credentials, phone number verification, and SMS account settings.
- MobileMessaging.areSMSAPICredentialProvided () [ Example in XML, Json, Tsv (Excel) ]
- MobileMessaging.getSMSProvider () [ Example in XML, Json, Tsv (Excel) ]
- MobileMessaging.setSMSAPICredential (string provider, array credentials = 'Array') [ No example available ]
- MobileMessaging.addPhoneNumber (string phoneNumber) [ No example available ]
- MobileMessaging.resendVerificationCode (string phoneNumber) [ No example available ]
- MobileMessaging.getCreditLeft () [ Example in XML, Json, Tsv (Excel) ]
- MobileMessaging.getPhoneNumbers () [ Example in XML, Json, Tsv (Excel) ]
- MobileMessaging.removePhoneNumber (string phoneNumber) [ No example available ]
- MobileMessaging.validatePhoneNumber (string phoneNumber, string verificationCode) [ No example available ]
- MobileMessaging.deleteSMSAPICredential () [ Example in XML, Json, Tsv (Excel) ]
- MobileMessaging.setDelegatedManagement (bool delegatedManagement) [ No example available ]
- MobileMessaging.getDelegatedManagement () [ Example in XML, Json, Tsv (Excel) ]
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.
- MultiChannelConversionAttribution.setGoalAttribution (idSite, idGoal, isEnabled) [ No example available ]
- MultiChannelConversionAttribution.getGoalAttribution (idSite, idGoal) [ No example available ]
- MultiChannelConversionAttribution.getChannelAttribution (idSite, period, date, idGoal, idCampaignDimensionCombination = '0', segment = '', expanded = '', flat = '', idSubtable = '') [ No example available ]
- MultiChannelConversionAttribution.getAvailableCampaignDimensionCombinations () [ Example in XML, Json, Tsv (Excel) ]
- MultiChannelConversionAttribution.getSiteAttributionGoals (idSite) [ Example in XML, Json, Tsv (Excel) ]
The MultiSites API lets you request the key metrics (visits, page views, revenue) for all Websites in Matomo.
- MultiSites.getAll (string period, string date, ?string segment, bool enhanced = false, ?string pattern, showColumns = 'Array') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MultiSites.getOne (int idSite, string period, string date, ?string segment, bool enhanced = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- MultiSites.getAllWithGroups (?string period, ?string date, ?string segment, string pattern = '', int filter_limit = '0') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
The Overlay API exposes translation data and overlay-specific page transition reports.
- Overlay.getTranslations () [ Example in XML, Json, Tsv (Excel) ]
- Overlay.getFollowingPages (url, int idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Provides reporting API methods for aggregated page performance metrics.
- PagePerformance.get (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
The PrivacyManager API lets you manage GDPR workflows, anonymization settings, and privacy compliance controls.
- PrivacyManager.deleteDataSubjects (array visits) [ No example available ]
- PrivacyManager.exportDataSubjects (array visits) [ No example available ]
- PrivacyManager.findDataSubjects (idSite, string segment) [ No example available ]
- PrivacyManager.anonymizeSomeRawData (idSites, string date, anonymizeIp = '', anonymizeLocation = '', anonymizeUserId = '', unsetVisitColumns = 'Array', unsetLinkVisitActionColumns = 'Array', string passwordConfirmation = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- PrivacyManager.getAvailableVisitColumnsToAnonymize () [ Example in XML, Json, Tsv (Excel) ]
- PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize () [ Example in XML, Json, Tsv (Excel) ]
Exposes reporting endpoints for visitor internet provider and ISP data. Reports group visits by resolved provider hostname and display label.
- Provider.getProvider (idSite, period, date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
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.
- Referrers.get (idSite, string period, string date, ?string segment, columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getReferrerType (idSite, string period, string date, ?string segment, typeReferrer = '', ?int idSubtable, bool expanded = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getAll (idSite, string period, string date, ?string segment) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getKeywords (idSite, string period, string date, ?string segment, bool expanded = false, bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getSearchEnginesFromKeywordId (idSite, string period, string date, int idSubtable, ?string segment) [ No example available ]
- Referrers.getSearchEngines (idSite, string period, string date, ?string segment, bool expanded = false, bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getKeywordsFromSearchEngineId (idSite, string period, string date, int idSubtable, ?string segment) [ No example available ]
- Referrers.getCampaigns (idSite, string period, string date, ?string segment, bool expanded = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getKeywordsFromCampaignId (idSite, string period, string date, int idSubtable, ?string segment) [ No example available ]
- Referrers.getWebsites (idSite, string period, string date, ?string segment, bool expanded = false, bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getUrlsFromWebsiteId (idSite, string period, string date, int idSubtable, ?string segment) [ No example available ]
- Referrers.getSocials (idSite, string period, string date, ?string segment, bool expanded = false, bool flat = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getAIAssistants (idSite, string period, string date, ?string segment, bool expanded = false, bool flat = false, ?string secondaryDimension) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getUrlsForSocial (idSite, string period, string date, ?string segment, ?int idSubtable) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getEntryPageUrlsForAIAssistant (idSite, string period, string date, ?string segment, ?int idSubtable) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getEntryPageTitlesForAIAssistant (idSite, string period, string date, ?string segment, ?int idSubtable) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getNumberOfDistinctSearchEngines (idSite, string period, string date, ?string segment) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getNumberOfDistinctSocialNetworks (idSite, string period, string date, ?string segment) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getNumberOfDistinctKeywords (idSite, string period, string date, ?string segment) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getNumberOfDistinctCampaigns (idSite, string period, string date, ?string segment) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getNumberOfDistinctWebsites (idSite, string period, string date, ?string segment) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getNumberOfDistinctAIAssistants (idSite, string period, string date, ?string segment) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Referrers.getNumberOfDistinctWebsitesUrls (idSite, string period, string date, ?string segment) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Provides API methods for screen resolution and device configuration reports.
- Resolution.getResolution (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Resolution.getConfiguration (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
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.
- RollUpReporting.addRollUp (name, sourceIdSites, timezone, currency) [ No example available ]
- RollUpReporting.updateRollUp (idSite, name = '', sourceIdSites = '', timezone = '', currency = '') [ Example in XML, Json, Tsv (Excel) ]
- RollUpReporting.getRollUps () [ Example in XML, Json, Tsv (Excel) ]
Provides API endpoints for configuring monitored SEO Web Vitals URLs and reading archived report data.
- SEOWebVitals.configureTopPageUrls (idSite) [ Example in XML, Json, Tsv (Excel) ]
- SEOWebVitals.getWebVitals (idSite, period, date, idSubtable = '', expanded = '', flat = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
The SEO API lets you access a list of SEO metrics for the specified URL: Bing indexed pages and age of the Domain name.
- SEO.getRank (url) [ Example in XML, Json, Tsv (Excel) ]
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.
- ScheduledReports.addReport (idSite, string description, string period, hour, string reportType, string reportFormat, reports, parameters, idSegment = '', string evolutionPeriodFor = 'prev', evolutionPeriodN = '', ?string periodParam) [ No example available ]
- ScheduledReports.updateReport (idReport, idSite, string description, string period, hour, string reportType, string reportFormat, reports, parameters, idSegment = '', string evolutionPeriodFor = 'prev', evolutionPeriodN = '', ?string periodParam) [ No example available ]
- ScheduledReports.deleteReport (idReport) [ No example available ]
- ScheduledReports.getReports (idSite = '', period = '', idReport = '', ifSuperUserReturnOnlySuperUserReports = '', idSegment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- ScheduledReports.generateReport (idReport, string date, language = '', outputType = '', period = '', reportFormat = '', parameters = '') [ No example available ]
- ScheduledReports.sendReport (idReport, period = '', date = '', force = '') [ No example available ]
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
- SearchEngineKeywordsPerformance.getKeywords (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getKeywordsImported (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getKeywordsGoogle (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getKeywordsBing (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getKeywordsYandex (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getKeywordsGoogleWeb (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getKeywordsGoogleImage (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getKeywordsGoogleVideo (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getKeywordsGoogleNews (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getCrawlingOverviewBing (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getCrawlingOverviewYandex (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- SearchEngineKeywordsPerformance.getCrawlingErrorExamplesBing (idSite) [ Example in XML, Json, Tsv (Excel) ]
The SegmentEditor API lets you add, update, delete custom Segments, and list saved segments.
- SegmentEditor.isUserCanAddNewSegment (?int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SegmentEditor.delete (int idSegment) [ No example available ]
- SegmentEditor.update (int idSegment, string name, string definition, ?int idSite, bool autoArchive = false, bool enabledAllUsers = false) [ No example available ]
- SegmentEditor.add (string name, string definition, ?int idSite, bool autoArchive = false, bool enabledAllUsers = false) [ No example available ]
- SegmentEditor.star (int idSegment) [ No example available ]
- SegmentEditor.unstar (int idSegment) [ No example available ]
- SegmentEditor.get (int idSegment) [ No example available ]
- SegmentEditor.getAll (?int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SegmentEditor.getSegmentData (int idSite, string period, string date, string segment) [ No example available ]
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.
- SitesManager.getJavascriptTag (int idSite, string piwikUrl = '', bool mergeSubdomains = false, bool groupPageTitlesByDomain = false, bool mergeAliasUrls = false, array visitorCustomVariables = 'Array', array pageCustomVariables = 'Array', string customCampaignNameQueryParam = '', string customCampaignKeywordParam = '', bool doNotTrack = false, bool disableCookies = false, bool trackNoScript = false, bool crossDomain = false, bool forceMatomoEndpoint = false, excludedQueryParams = '', excludedReferrers = '', bool disableCampaignParameters = false) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getImageTrackingCode (idSite, piwikUrl = '', actionName = '', idGoal = '', revenue = '', forceMatomoEndpoint = '') [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesFromGroup (string group = '') [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesGroups () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSiteFromId (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSiteUrlsFromId (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getAllSites () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getAllSitesId () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesWithAdminAccess (fetchAliasUrls = '', pattern = '', limit = '', sitesToExclude = 'Array') [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesWithMinimumAccess (string permission, ?string pattern, ?int limit, array sitesToExclude = 'Array', array siteTypesToExclude = 'Array') [ No example available ]
- SitesManager.getSitesWithViewAccess () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesWithAtLeastViewAccess (limit = '') [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesIdWithAdminAccess () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesIdWithViewAccess () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesIdWithWriteAccess () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesIdWithAtLeastViewAccess () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSitesIdFromSiteUrl (string url) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.addSite (string siteName, urls = '', ecommerce = '', siteSearch = '', searchKeywordParameters = '', searchCategoryParameters = '', excludedIps = '', excludedQueryParameters = '', timezone = '', currency = '', group = '', startDate = '', excludedUserAgents = '', keepURLFragments = '', type = '', settingValues = '', excludeUnknownUrls = '', excludedReferrers = '', description = '') [ No example available ]
- SitesManager.getSiteSettings (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.deleteSite (int idSite, ?string passwordConfirmation) [ No example available ]
- SitesManager.addSiteAliasUrls (int idSite, urls) [ No example available ]
- SitesManager.setSiteAliasUrls (int idSite, array urls = 'Array') [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getIpsForRange (string ipRange) [ No example available ]
- SitesManager.setGlobalExcludedIps (string excludedIps) [ No example available ]
- SitesManager.setGlobalSearchParameters (string searchKeywordParameters, string searchCategoryParameters) [ No example available ]
- SitesManager.getSearchKeywordParametersGlobal () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getSearchCategoryParametersGlobal () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getExcludedQueryParameters (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getExcludedQueryParametersGlobal (?int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getExcludedUserAgentsGlobal () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.setGlobalExcludedUserAgents (string excludedUserAgents) [ No example available ]
- SitesManager.getExcludedReferrers (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getExcludedReferrersGlobal () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.setGlobalExcludedReferrers (string excludedReferrers) [ No example available ]
- SitesManager.getKeepURLFragmentsGlobal () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.setKeepURLFragmentsGlobal (enabled) [ No example available ]
- SitesManager.getExcludedIpsGlobal () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getDefaultCurrency () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.setDefaultCurrency (string defaultCurrency) [ No example available ]
- SitesManager.getDefaultTimezone () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.setDefaultTimezone (string defaultTimezone) [ No example available ]
- SitesManager.setGlobalQueryParamExclusion (string exclusionType, ?string queryParamsToExclude) [ No example available ]
- SitesManager.getExclusionTypeForQueryParams (?int idSite) [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.updateSite (idSite, siteName = '', urls = '', ecommerce = '', siteSearch = '', searchKeywordParameters = '', searchCategoryParameters = '', excludedIps = '', excludedQueryParameters = '', timezone = '', currency = '', group = '', startDate = '', excludedUserAgents = '', keepURLFragments = '', type = '', settingValues = '', excludeUnknownUrls = '', excludedReferrers = '', description = '') [ No example available ]
- SitesManager.getCurrencyList () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getCurrencySymbols () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.isTimezoneSupportEnabled () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getTimezonesList () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.getTimezoneName (string timezone, ?string countryCode, ?bool multipleTimezonesInCountry) [ No example available ]
- SitesManager.getUniqueSiteTimezones () [ Example in XML, Json, Tsv (Excel) ]
- SitesManager.renameGroup (string oldGroupName, string newGroupName) [ No example available ]
- SitesManager.getPatternMatchSites (string pattern, limit = '', sitesToExclude = 'Array') [ No example available ]
- SitesManager.getNumWebsitesToDisplayPerPage () [ Example in XML, Json, Tsv (Excel) ]
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}.
- TagManager.getAvailableContexts () [ Example in XML, Json, Tsv (Excel) ]
- TagManager.getAvailableEnvironments () [ Example in XML, Json, Tsv (Excel) ]
- TagManager.getAvailableEnvironmentsWithPublishCapability (idSite) [ Example in XML, Json, Tsv (Excel) ]
- TagManager.getAvailableTagFireLimits () [ Example in XML, Json, Tsv (Excel) ]
- TagManager.getAvailableComparisons () [ Example in XML, Json, Tsv (Excel) ]
- TagManager.getAvailableTagTypesInContext (idContext) [ No example available ]
- TagManager.getAvailableTriggerTypesInContext (idContext) [ No example available ]
- TagManager.getAvailableVariableTypesInContext (idContext) [ No example available ]
- TagManager.getContainerEmbedCode (idSite, idContainer, environment) [ No example available ]
- TagManager.getContainerInstallInstructions (idSite, idContainer, environment, jsFramework = '') [ No example available ]
- TagManager.getContainerTags (idSite, idContainer, idContainerVersion) [ No example available ]
- TagManager.createDefaultContainerForSite (idSite) [ Example in XML, Json, Tsv (Excel) ]
- TagManager.addContainerTag (idSite, idContainer, idContainerVersion, type, name, parameters = 'Array', fireTriggerIds = 'Array', blockTriggerIds = 'Array', fireLimit = 'unlimited', fireDelay = '0', priority = '999', startDate = '', endDate = '', description = '', status = '') [ No example available ]
- TagManager.updateContainerTag (idSite, idContainer, idContainerVersion, idTag, name, parameters = 'Array', fireTriggerIds = 'Array', blockTriggerIds = 'Array', fireLimit = 'unlimited', fireDelay = '0', priority = '999', startDate = '', endDate = '', description = '') [ No example available ]
- TagManager.deleteContainerTag (idSite, idContainer, idContainerVersion, idTag) [ No example available ]
- TagManager.pauseContainerTag (idSite, idContainer, idContainerVersion, idTag) [ No example available ]
- TagManager.resumeContainerTag (idSite, idContainer, idContainerVersion, idTag) [ No example available ]
- TagManager.getContainerTag (idSite, idContainer, idContainerVersion, idTag) [ No example available ]
- TagManager.getContainerTriggerReferences (idSite, idContainer, idContainerVersion, idTrigger) [ No example available ]
- TagManager.getContainerTriggers (idSite, idContainer, idContainerVersion) [ No example available ]
- TagManager.addContainerTrigger (idSite, idContainer, idContainerVersion, type, name, parameters = 'Array', conditions = 'Array', description = '') [ No example available ]
- TagManager.updateContainerTrigger (idSite, idContainer, idContainerVersion, idTrigger, name, parameters = 'Array', conditions = 'Array', description = '') [ No example available ]
- TagManager.deleteContainerTrigger (idSite, idContainer, idContainerVersion, idTrigger) [ No example available ]
- TagManager.getContainerTrigger (idSite, idContainer, idContainerVersion, idTrigger) [ No example available ]
- TagManager.getContainerVariableReferences (idSite, idContainer, idContainerVersion, idVariable) [ No example available ]
- TagManager.getContainerVariables (idSite, idContainer, idContainerVersion) [ No example available ]
- TagManager.getAvailableContainerVariables (idSite, idContainer, idContainerVersion) [ No example available ]
- TagManager.addContainerVariable (idSite, idContainer, idContainerVersion, type, name, parameters = 'Array', defaultValue = '', lookupTable = 'Array', description = '') [ No example available ]
- TagManager.updateContainerVariable (idSite, idContainer, idContainerVersion, idVariable, name, parameters = 'Array', defaultValue = '', lookupTable = 'Array', description = '') [ No example available ]
- TagManager.deleteContainerVariable (idSite, idContainer, idContainerVersion, idVariable) [ No example available ]
- TagManager.getContainerVariable (idSite, idContainer, idContainerVersion, idVariable) [ No example available ]
- TagManager.getContainers (idSite) [ Example in XML, Json, Tsv (Excel) ]
- TagManager.addContainer (idSite, context, name, description = '', ignoreGtmDataLayer = '0', isTagFireLimitAllowedInPreviewMode = '0', activelySyncGtmDataLayer = '0') [ No example available ]
- TagManager.updateContainer (idSite, idContainer, name, description = '', ignoreGtmDataLayer = '0', isTagFireLimitAllowedInPreviewMode = '0', activelySyncGtmDataLayer = '0') [ No example available ]
- TagManager.createContainerVersion (idSite, idContainer, name, description = '', idContainerVersion = '') [ No example available ]
- TagManager.updateContainerVersion (idSite, idContainer, idContainerVersion, name, description = '') [ No example available ]
- TagManager.getContainerVersions (idSite, idContainer) [ No example available ]
- TagManager.getContainerVersion (idSite, idContainer, idContainerVersion) [ No example available ]
- TagManager.deleteContainerVersion (idSite, idContainer, idContainerVersion) [ No example available ]
- TagManager.publishContainerVersion (idSite, idContainer, idContainerVersion, environment) [ No example available ]
- TagManager.deleteContainer (idSite, idContainer) [ No example available ]
- TagManager.getContainer (idSite, idContainer) [ No example available ]
- TagManager.enablePreviewMode (idSite, idContainer, idContainerVersion = '') [ No example available ]
- TagManager.disablePreviewMode (idSite, idContainer, idContainerVersion = '') [ No example available ]
- TagManager.changeDebugUrl (idSite, url) [ Example in XML, Json, Tsv (Excel) ]
- TagManager.exportContainerVersion (idSite, idContainer, idContainerVersion = '') [ No example available ]
- TagManager.importContainerVersion (exportedContainerVersion, idSite, idContainer, backupName = '') [ No example available ]
Provides API methods for Tour challenges and engagement levels.
- Tour.getChallenges () [ Example in XML, Json, Tsv (Excel) ]
- Tour.skipChallenge (string id) [ No example available ]
- Tour.getLevel () [ Example in XML, Json, Tsv (Excel) ]
Provides API methods for transition reports around a specific page action.
- Transitions.getTransitionsForPageTitle (string pageTitle, int idSite, string period, string date, segment = '', limitBeforeGrouping = '0') [ No example available ]
- Transitions.getTransitionsForPageUrl (string pageUrl, int idSite, string period, string date, segment = '', limitBeforeGrouping = '0') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- Transitions.getTransitionsForAction (string actionName, string actionType, int idSite, string period, string date, segment = '', limitBeforeGrouping = '0', parts = 'all') [ No example available ]
- Transitions.isPeriodAllowed (idSite, period, date) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Provides API methods for managing two-factor authentication.
- TwoFactorAuth.resetTwoFactorAuth (string userLogin, string passwordConfirmation = '') [ Example in XML, Json, Tsv (Excel) ]
The UserCountry API lets you access reports about your visitors' Countries and Continents.
- UserCountry.getCountry (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- UserCountry.getContinent (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- UserCountry.getRegion (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- UserCountry.getCity (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- UserCountry.getCountryCodeMapping () [ Example in XML, Json, Tsv (Excel) ]
- UserCountry.getLocationFromIP (ip = '', provider = '') [ Example in XML, Json, Tsv (Excel) ]
- UserCountry.setLocationProvider (providerId) [ No example available ]
- UserCountry.getNumberOfDistinctCountries (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
Provides API methods for User ID reports.
- UserId.getUsers (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
The UserLanguage API lets you access reports about your Visitors language setting
- UserLanguage.getLanguage (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- UserLanguage.getLanguageCode (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
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.
- UsersFlow.getUsersFlowPretty (idSite, period, date, segment = '', expanded = '', flat = '', idSubtable = '', dataSource = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- UsersFlow.getUsersFlow (idSite, period, date, limitActionsPerStep = '5', exploreStep = '', exploreUrl = '', segment = '', expanded = '', dataSource = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- UsersFlow.getInteractionActions (idSite, period, date, interactionPosition, offsetActionsPerStep = '', segment = '', idSubtable = '', dataSource = '') [ No example available ]
- UsersFlow.getAvailableDataSources () [ Example in XML, Json, Tsv (Excel) ]
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.
- UsersManager.getAvailableRoles () [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getAvailableCapabilities () [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.setUserPreference (string userLogin, string preferenceName, preferenceValue) [ No example available ]
- UsersManager.getUserPreference (string preferenceName, userLogin = '') [ No example available ]
- UsersManager.getUsersPlusRole (int idSite, limit = '', offset = '0', filter_search = '', filter_access = '', filter_status = '') [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getUsers (string userLogins = '') [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getUsersLogin () [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getUsersSitesFromAccess (string access) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getUsersAccessFromSite (int idSite) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getUsersWithSiteAccess (int idSite, string access) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getSitesAccessFromUser (string userLogin) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getSitesAccessForUser (string userLogin, limit = '', offset = '0', filter_search = '', filter_access = '') [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getUser (string userLogin) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getUserByEmail (string userEmail) [ No example available ]
- UsersManager.addUser (string userLogin, string password, string email, initialIdSite = '', ?string passwordConfirmation) [ No example available ]
- UsersManager.inviteUser (string userLogin, string email, initialIdSite = '', expiryInDays = '', ?string passwordConfirmation) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.setSuperUserAccess (string userLogin, hasSuperUserAccess, ?string passwordConfirmation) [ No example available ]
- UsersManager.hasSuperUserAccess () [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.getUsersHavingSuperUserAccess () [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.updateUser (string userLogin, password = '', email = '', passwordConfirmation = '') [ No example available ]
- UsersManager.deleteUser (string userLogin, ?string passwordConfirmation) [ No example available ]
- UsersManager.logoutUser (string userLogin, ?string passwordConfirmation) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.userExists (string userLogin) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.userEmailExists (string userEmail) [ No example available ]
- UsersManager.getUserLoginFromUserEmail (string userEmail) [ No example available ]
- UsersManager.setUserAccess (string userLogin, access, idSites, ?string passwordConfirmation) [ No example available ]
- UsersManager.addCapabilities (string userLogin, capabilities, idSites) [ No example available ]
- UsersManager.removeCapabilities (string userLogin, capabilities, idSites) [ No example available ]
- UsersManager.createAppSpecificTokenAuth (string userLogin, string passwordConfirmation, string description, expireDate = '', expireHours = '0', bool secureOnly = false) [ No example available ]
- UsersManager.newsletterSignup () [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.resendInvite (string userLogin, expiryInDays = '7', ?string passwordConfirmation) [ Example in XML, Json, Tsv (Excel) ]
- UsersManager.generateInviteLink (string userLogin, expiryInDays = '7', ?string passwordConfirmation) [ Example in XML, Json, Tsv (Excel) ]
VisitFrequency API lets you access a list of metrics related to Returning Visitors.
- VisitFrequency.get (idSite, string period, string date, ?string segment, columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
VisitTime API lets you access reports by Hour (Server time), and by Hour Local Time of your visitors.
- VisitTime.getVisitInformationPerLocalTime (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitTime.getVisitInformationPerServerTime (idSite, string period, string date, segment = '', bool hideFutureHoursWhenToday = false) [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitTime.getByDayOfWeek (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
VisitorInterest API lets you access visitor engagement distribution reports, including visits by pages viewed, visit duration, days since last visit, and visit count.
- VisitorInterest.getNumberOfVisitsPerVisitDuration (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitorInterest.getNumberOfVisitsPerPage (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitorInterest.getNumberOfVisitsByDaysSinceLast (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitorInterest.getNumberOfVisitsByVisitCount (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
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.
- VisitsSummary.get (idSite, string period, string date, segment = '', columns = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getVisits (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getUniqueVisitors (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getUsers (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getActions (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getMaxActions (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getBounceCount (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getVisitsConverted (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getSumVisitsLength (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]
- VisitsSummary.getSumVisitsLengthPretty (idSite, string period, string date, segment = '') [ Example in XML, Json, Tsv (Excel) , RSS of the last 10 days ]

Available shortcuts

This page can't be rendered on screens with width or height below 200px.