Skip to main content
The statistics section bundles the settings related to the statistics data of your shop.

statistics* - Basic structure

Below is the basic structure of the statistics node.
{
    "statistics": {
      "dataRetention": {...}
    }
}

Parameter overview

ParameterDescription
dataRetentionRetention period of the statistics data per time level (hourly/daily/monthly values).

statistics.dataRetention - Retention of statistics data

This configuration node defines how long statistics data is retained per time level. In the statistics, figures on visits, orders, and revenue accumulate continuously. These can be stored at the following time levels:
  • Hourly values - one data point per hour (for example, to analyze peak times or campaigns),
  • Daily values - one data point per day (for example, to compare Black Friday 2025 with 2024),
  • Monthly values - one data point per month (for example, to compare revenue growth and customer acquisition).
For each of these levels, you define the retention period separately. The levels differ in terms of level of detail and storage requirements. Hourly values are very detailed, but they require a lot of storage space (24 data points per day) and are particularly interesting for short-term analyses. Monthly values, on the other hand, are coarse, require hardly any storage space (12 data points per year), and are suitable for analyzing trends over several years. The default values are chosen so that the fine-grained hourly values are stored for the shortest time and the coarse monthly values for the longest. This keeps the stored data volume small without losing the long-term trend. dataRetention is a singleton and is configured once per shop.

Example configuration statistics.dataRetention

{
  "retainHourlyInMonths": 3,
  "retainDailyInMonths": 24,
  "retainMonthlyInMonths": 60,
  "monthlyUnlimitedRetention": false
}

Parameter overview

ParameterTypeDescription
retainHourlyInMonthsuintRetention period of the hourly values in months. Hourly values are the finest and most storage-intensive level.
The maximum limits them to no more than one year.
Possible values: 0 - 12
Default: 3
retainDailyInMonthsuintRetention period of the daily values in months.
Default: 24
retainMonthlyInMonthsuintRetention period of the monthly values in months.
Default: 60
monthlyUnlimitedRetentionboolActivates unlimited retention of the monthly values.
true - Monthly values are retained permanently.
false - Monthly values are retained according to retainMonthlyInMonths.
Default: false