MATOMO ON-PREMISE

The Custom Reports plugin version 5.4.0 introduces major enhancements that improve flexibility, scalability, and control over report structures for advanced reporting needs.

This feature is available with an active subscription or free trial of the Custom Reports plugin or the Premium Bundle.

Matomo users can now configure the maximum number of dimensions allowed in a custom report at the instance level. For example, you can adjust the maximum number of dimensions from 3 (default) to 6 or 10. After adjusting the configuration, the normal Custom Report creation/editing workflow will reflect this new maximum:

select custom dimensions matomo custom reports

Reports with more dimensions will generally take longer to archive and require more storage space. To manage this, new configuration options are available to specify row limits at the table and subtable level for each number of dimensions. For example, you can apply higher row limits to reports with one or two dimensions, and lower row limits to reports with a higher number of dimensions. This can help to manage performance and control data volumes.

Note: Increasing the dimension limit will place more demands on your server infrastructure, so adjustments should be made cautiously.

Configure Custom Report Dimensions

From Custom Reports plugin version 5.4.0, new configuration settings let you control how many dimensions a custom report can use, and define row limits per table and subtable. These settings are configured manually in your config.ini.php file and applied at the instance level.

lightbulb for tip
Always test changes in a staging environment before applying them in production to ensure stability and performance.

To apply these settings, open your config.ini.php file and update the [CustomReports] section to suit your reporting needs and system capacity.

The following configuration options have been added:

  • custom_reports_max_dimensions: Sets the maximum number of dimensions allowed per custom report.
  • datatable_archiving_maximum_rows_custom_reports_dimensions_{n}: Defines the row limit for the top-level table when a report uses exactly {n} dimensions.
  • datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_{n}: Defines the row limit for each subtable when a report uses exactly {n} dimensions. These limits apply from the second dimension onward.

Default Value Variables

Additionally to the variables defining the maximum number of dimensions and the row limits corresponding with each number of dimensions, Matomo offers *_default variables. These are used in case a report is created with a number of dimensions for which the row limits are not defined explicitly. For example, if you increase the number of allowed dimensions to 4 but do not explicitly configure row limits for this additional dimension, Matomo uses the following default value variables as a fall back:

  • datatable_archiving_maximum_rows_custom_reports_dimensions_default
  • datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_default

These variables ensure the feature can still be created when the row limit configuration is missing. If these *_default variables are not set in your config file, Matomo will internally default to:

  • 50 rows for the main table
  • 10 rows for each subtable

This aims to prevents runaway row generation in high-dimension reports, but may result in unexpectedly small datasets if you haven’t explicitly configured the values for the lower number of dimensions.

Note: Choose your configuration based on reporting needs, infrastructure capacity, and acceptable archiving performance. For reports using many dimensions, test changes in a staging environment to confirm stability and resource usage.

Default Configuration

By default, the Custom Reports plugin comes with conservative limits to ensure archiving performance across most setups. These are:

[CustomReports]
custom_reports_max_dimensions = 3

datatable_archiving_maximum_rows_custom_reports_dimensions_1 = 500
datatable_archiving_maximum_rows_custom_reports_dimensions_2 = 500
datatable_archiving_maximum_rows_custom_reports_dimensions_3 = 500

datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_2 = 100
datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_3 = 100

datatable_archiving_maximum_rows_custom_reports_dimensions_default = 50
datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_default = 10

This means that reports can use up to 3 dimensions and can contain up to 500 rows at the main table level and 100 rows at the subtable level.

Example configuration with 7 Dimensions (extended setup with a fall back)

In the following example, the configuration allows reports up to 7 dimensions. The row limits are defined up to dimension 6 (decreasing for reports with more dimensions), but if a report is created with 7 dimensions it will use the *_default variables to determine row limits:

[CustomReports]
custom_reports_max_dimensions = 7

datatable_archiving_maximum_rows_custom_reports_dimensions_1 = 500
datatable_archiving_maximum_rows_custom_reports_dimensions_2 = 500
datatable_archiving_maximum_rows_custom_reports_dimensions_3 = 500
datatable_archiving_maximum_rows_custom_reports_dimensions_4 = 125
datatable_archiving_maximum_rows_custom_reports_dimensions_5 = 50
datatable_archiving_maximum_rows_custom_reports_dimensions_6 = 40

datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_2 = 100
datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_3 = 100
datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_4 = 100
datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_5 = 40
datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_6 = 20

datatable_archiving_maximum_rows_custom_reports_dimensions_default = 30
datatable_archiving_maximum_rows_subtable_custom_reports_dimensions_default = 10

Example report structure

If a report with 6 dimensions is created using the above configuration, it could look like this:

Dimension 1: Country
–Up to 40 rows
Dimension 2: Device Type
—Up to 20 rows per country
—–Dimension 3: Browser
—–Up to 20 rows per device type
——Dimension 4: Operating System
——Up to 20 rows per browser
——–Dimension 5: Screen Resolution
——–Up to 20 rows per OS
———-Dimension 6: Campaign Name
———-Up to 20 rows per screen resolution

For most setups, the default configuration will provide a good balance between report detail and system performance. However, if you need to generate more complex reports with additional dimensions, adjust the configuration carefully and monitor the impact on archiving and infrastructure.

Previous FAQ: Which dimensions and metrics can be selected in Custom Reports?