Skip to main content
The statistics section bundles the settings related to the statistics data of your shop. Currently, it controls data retention: via the dataRetention sub-node, you define how long the collected statistics values are retained per time level. This determines how far back your analyses reach and how much storage the statistics occupy.

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 section defines how long statistics data is retained per time level. WEBSALE stores the values at three granularities: hourly values, daily values, and monthly values. Each level is controlled via its own parameter. The guiding principle is: the older the data, the coarser it may be. The finest level (hourly values) is the most storage-intensive and only relevant in the short term, so it expires early. The coarsest level (monthly values) is very small and valuable in the long term, so it is retained for a long time. This keeps the data volume manageable 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
Delivery default and rationaleNew shops are delivered with the values shown above. They are deliberately chosen per time level:
  • Hourly values - 3 months: finest, most storage-intensive level (24 data points/day). Only relevant in the short term (peak times, yesterday’s campaign); covers one quarter.
  • Daily values - 24 months: the merchant’s working level. Two years enable a year-over-year comparison on a daily basis and cover seasonal effects.
  • Monthly values - 60 months (5 years): strategic level, very small in storage (12 data points/year). Provides multi-year trends such as revenue development and customer acquisition.
  • monthlyUnlimitedRetention - false: Unlimited data growth should be a deliberate decision by the merchant, not a silent default.
The statistics section bundles the settings related to the statistics data of your shop. Currently, it controls data retention: via the dataRetention sub-node, you define how long the collected statistics values are retained per time level. This determines how far back your analyses reach and how much storage the statistics occupy.

statistics* - Basic structure

Below is the basic structure of the statistics node.
{
    "statistics": {
      "dataRetention": {...}
    }
}
ParameterDescription
dataRetentionRetention period of the statistics data per time level (hourly/daily/monthly values).

statistics.dataRetention - Retention of statistics data

This section defines how long statistics data is retained per time level. WEBSALE stores the values at three granularities: hourly values, daily values, and monthly values. Each level is controlled via its own parameter. The guiding principle is: the older the data, the coarser it may be. The finest level (hourly values) is the most storage-intensive and only relevant in the short term, so it expires early. The coarsest level (monthly values) is very small and valuable in the long term, so it is retained for a long time. This keeps the data volume manageable 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
}
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
Delivery default and rationaleNew shops are delivered with the values shown above. They are deliberately chosen per time level:
  • Hourly values - 3 months: finest, most storage-intensive level (24 data points/day). Only relevant in the short term (peak times, yesterday’s campaign); covers one quarter.
  • Daily values - 24 months: the merchant’s working level. Two years enable a year-over-year comparison on a daily basis and cover seasonal effects.
  • Monthly values - 60 months (5 years): strategic level, very small in storage (12 data points/year). Provides multi-year trends such as revenue development and customer acquisition.
  • monthlyUnlimitedRetention - false: Unlimited data growth should be a deliberate decision by the merchant, not a silent default.