New Funnel triggers past report generation


We created a new Funnel attached to an existing goal (created 4 days before)

Mar 16, 2021 16:29:46 **user** changed a goal Nudge clicked (Funnel update)
Mar 16, 2021 16:26:48 **user** changed a goal Nudge clicked (Funnel creation)
Mar 12, 2021 17:29:02 **user** added a new goal Nudge clicked

The next cron job tried to generate all the past reports for this new Funnel with ID 29:

(I had 391 lines matching plugin = Funnels, report = 29, I share only the one that take the most time)

You can see that we try to generate a lot of report for period of time before March 16th.
FYI, we didn’t invalidate any historical data.

Knowing that this page mentions

When you create a new funnel or update an existing funnel, the data for past dates won’t be available by default and you will only see reports starting from that day you create the funnel.

Could you please advise why Funnel reports behaves this way, and what would be the way to properly deactivate past report generation?

FYI, we are using Matomo 4.2.1 and Funnel 4.0.5

Thanks and Regards

Since Matomo 4 by default Matomo will process historical reports for 6 months. You can change this setting in your config.


There is currently a bug in the code preventing
rearchive_reports_in_past_last_n_months = last0
rearchive_reports_in_past_last_n_months = 0
to work. Both fail, as explained here: Past Goal/Funnel report generation ends up in infinite loop

Anyway, even if this setting was working, past Funnel reports would still be generated, because last0 simply means the beginning of the current month.
Thus, if I update or create a Funnel today (March 23rd), all past reports since March 1st would be generated.
Indeed, there is a setDay(1) in the code, that will always set the start date to the first day of the month.

This very recent PR should partially fix the issue:

rearchive_reports_in_past_last_n_months = 0 should work fine, but setDay(1) will still be applied, meaning some past report will be generated.

This last PR should fix the issue:

@Jason_1282 do you know when it is going to be released?

Hi @nelhefni,

This PR has already been merged, so it will be released together with 4.3.0
There is no release date yet, but it’s not that far in the future.
There are also already two beta releases for it.