Reports with segmentation won't be preprocessed.
Steps to reproduce:
- Build a plugin with one report that uses segmentation and one that doesn't (for reference).
- Make sure, your data won't be browser-archived. (settings->general settings)
->at this point I noticed, that the report with Seg. will be browser-archived even if browser-archiving is disabled.
- Now have a look at the function isArchivingDisabledFor (in line 938 in ArchiveProcessing.php). In short: If this function returns true data won't be archived, if it returns false it will be. (or so I thought) We can use this function to force or prevent archiving by adding 'return true;' (=>prevents archiving) or 'return false;' (=>forces archiving) at the first line of the function (line 940 of ArchiveProcessing.php)
- Next step: We'll try to preprocess some data:
-make sure data can be processed: add 'return false' at first line of isArchivingDisabled
-trigger some visits for example with jmeter
-!don't trigger the archive process with your browser now!
-but trigger it via commandline for example with 'sh /var/www/..path..to..piwik/misc/cron/archive.sh'
-next change your isArchivingDisabled so that it returns true. (just change the line you added before)
5.So what you just did is this:
-You preprocessed some data and made it impossible that it will be processed by browser.
-Therefore you would expect that both your reports will show the same number of visits.
But what you get is this:
For your report without segmentation everything should work fine. It shows the visits you processed.
But your report with segmentation doesn't. It doesn't even show the visits you triggered before, because all archives(with period=1) for this report are vanished and the preprocessing for it hasn't worked at all.