Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preprocessing reports with segmentation #3144

Closed
anonymous-matomo-user opened this issue May 14, 2012 · 2 comments
Closed

Preprocessing reports with segmentation #3144

anonymous-matomo-user opened this issue May 14, 2012 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Performance For when we could improve the performance / speed of Matomo. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

Reports with segmentation won't be preprocessed.

Steps to reproduce:

  1. Build a plugin with one report that uses segmentation and one that doesn't (for reference).
  2. 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.
  3. 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)
  4. 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.

@mattab
Copy link
Member

mattab commented May 24, 2012

Thanks for the report, we will investigate after the next release

Note: this could be used for: #2981

@mattab
Copy link
Member

mattab commented Apr 5, 2013

we'll revisit this in Piwik 2.0 where we might refactor archiving a bit.

@anonymous-matomo-user anonymous-matomo-user added this to the 1.12 - The Great 1.x Backlog milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Performance For when we could improve the performance / speed of Matomo. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants