MATOMO ON-PREMISE ONLY

For performance reasons, Matomo (Piwik) will by default only archive the first top 500 pages, top 1000 keywords, top 1000 websites, Custom Variables, etc. Matomo will then sum all the remaining pages, keywords, etc. under the label « Others ». If you wish to archive all the data, or simply archive more than the current rows limit, you can override these values in the configuration file config/config.ini.php.

This guide applies to Matomo On-Premise hosted on your own infrastructure. If you are using Cloud-hosted Matomo, reach out to the support team to learn more.

For example, to limit all tables to 5000 entries, add the following under the [General] category in config/config.ini.php:

[General]
; maximum number of rows for any of the Referers tables (keywords, search engines, campaigns, etc.), and Custom variables names
datatable_archiving_maximum_rows_referrers = 5000
; maximum number of rows for any of the Referers subtable (search engines by keyword, keyword by campaign, etc.), and Custom variables values
datatable_archiving_maximum_rows_subtable_referrers = 5000

; maximum number of rows for any of the Actions tables (pages, downloads, outlinks)
datatable_archiving_maximum_rows_actions = 5000
; maximum number of rows for pages in categories (sub pages, when clicking on the + for a page category)
datatable_archiving_maximum_rows_subtable_actions = 5000

; maximum number of rows for any of the Events tables (Categories, Actions, Names)
datatable_archiving_maximum_rows_events = 5000
; maximum number of rows for sub-tables of the Events tables (eg. for the subtables Categories>Actions or Categories>Names).
datatable_archiving_maximum_rows_subtable_events = 100


; maximum number of rows for the Site Search table
 datatable_archiving_maximum_rows_site_search = 5000

; maximum number of rows for the User ID report
datatable_archiving_maximum_rows_userid_users = 5000

Custom dimensions rows limit

If you are using the Custom Dimensions and/or Custom Variables plugin, you can also adjust these settings:

As of Matomo 4:

[General]
; maximum number of rows for all individual Custom Dimensions reports
datatable_archiving_maximum_rows_custom_dimensions = 5000
; maximum number of rows for the Custom Dimensions subtables (list of all Page URLs per dimension value)
datatable_archiving_maximum_rows_subtable_custom_dimensions = 5000

; maximum number of rows for Custom Variables names report
datatable_archiving_maximum_rows_custom_variables = 5000
; maximum number of rows for Custom Variables values reports
datatable_archiving_maximum_rows_subtable_custom_variables = 5000

Before Matomo 4:

[General]
; maximum number of rows for all individual Custom Dimensions reports, and for Custom Variables names report
datatable_archiving_maximum_rows_custom_variables = 5000
; maximum number of rows for the Custom Dimensions subtables (list of all Page URLs per dimension value), and for Custom Variables values reports
datatable_archiving_maximum_rows_subtable_custom_variables = 5000

Custom Reports

If you are using the Custom Reports premium feature, you can also adjust these settings:

[CustomReports]
datatable_archiving_maximum_rows_custom_reports = 1000
datatable_archiving_maximum_rows_subtable_custom_reports = 500

Media Analytics

If you are using the Media Analytics premium feature, you can also adjust these settings:

[MediaAnalytics]
datatable_archiving_maximum_rows_media = 1000
datatable_archiving_maximum_rows_subtable_media = 500
archiving_ranking_query_row_limit_primary = 10000
archiving_ranking_query_row_limit_secondary = 75000

Other report limits

Some reports do not have a specific row limit definable in the config.ini.php file, for example the Location reports (i.e. Regions & Cities).
By default this is set to 500, and can be changed by adding the following under the [General] category.

datatable_archiving_maximum_rows_standard = 5000

Reprocessing reports

After doing this change, if you want your old reports to be re-processed with this new number of rows, see FAQ on how to re-process reports.

Archiving all data (unlimited rows)

If you really need to archive all data, you can set a very high number, for example one million: 1000000.
Important Note: Setting a very high limit for these settings can have a potentially significant impact on archiving and application performance.

Matomo Cloud customers

This FAQ relates to the on-premise version of Matomo. For Matomo Cloud users please contact support via the support chat in your cloud instance.