Setting our own fixed period?

Use case: We have a “fiscal year” from April 1st to March 31th the next year. When asked for yearly reports it’s never 2015 or 2014 but in Piwik language, a specific date range (FROM 2014-04-01 TO 2015-03-31).

Would it be possible to add to Piwik calendar our own “Period” ie “Fiscal Year 2014-2015” and get pre-processed reports exactly the same way we got pre-crunched Day, Week, Month and Year ?

We already got 65 million records in our DB so using just-in-time Date Range is already possible but quite slow even with 4 CPU and 8GB RAM with dedicated Apache and MySQL server.

Is my request worth a Feature Request in Github ? Meaning something useful for many…

Is it a gigantic effort to get something like this ?

Dali

From what I understand, it is doable, but you have to modify piwik’s core components. I’ve done some tests with this and successfully added a new period called “fisyear”, but i’ve had to modify the core code extensivly. I’m still having some troubles with the frontend part of things, but the statistics are correct and the pre-process is working nicely.

I was wondering if it was at all possible to create a plugin that would create a new period class and extend core code of Piwik. I’m still looking.

I just wanted to let you know there is a request for this I filled a year ago :

1 Like

Ok, I’m working on it on my spare time at work, so it might take some time to get the intended result.

Also, would you be interested in the pre-process and the API call with fisyear period to work without the frontend part or would you rather wait for the whole thing?

Je vais attendre que ce soit dans le Core idéalement…

(I’ll wait, we’re not sure to even keep Piwik running…)

Je parlais principalement de soumettre le code pour la modification du core en deux partie :

  1. Archivage et appels API
  2. Interface