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

When a segment is set to "reports are pre-processed" and viewing a report which hasn't yet been processed, display a notification #12256

Closed
mattab opened this issue Nov 7, 2017 · 4 comments
Assignees
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.

Comments

@mattab
Copy link
Member

mattab commented Nov 7, 2017

Use case

As a user when I view a report where a segment is applied, in some cases I will see "There is no data for this report" and may think that "My segment doesn't work!". But in many cases it is just a matter of waiting for some time and the segment data will be shown later once it's been processed. So I'd like to see a note that the data will be available later and I should check back after some time, rather than worry the service does not work.

This is the use case on the Piwik Cloud-hosted for some customers.

Solution

Whenever the requested segment hasn't been processed yet by core:archive for the requested date/period/site, we need to detect that "This segment hasn't yet been processed but will be later".

  • When we detect that the Segment exists in the DB and set to "reports are pre-processed", then we can display a message:

Segment 'XYZ' not applied
You are requesting data for the Segment 'XYZ'. Your segmented reports haven't yet been processed by the system and they will be available in a few hours.
Because all your reports for segment 'XYZ' will be processed by the system over the next few hours, we kindly invite you to check again in a few hours.
Please note that you can already test whether your segment will work and match your users by applying your segment [a]in the Visitor Log[/a]. When using the Visitor Log, you can see in real time which visits and actions were matched by your segment. This can help you confirm your Segment is constructed well and matches your users and actions as you expect to.

  • We would link to the Visitor Log for the same date/period/site so user can see directly whether there will be later data in the report originally requested.
  • This Modal shouldn't be displayed in pages where there are only Real time reports (visitor log, real time map, real time forms, real time videos, etc.)
  • This is very similar to The modal "Segment '%s' not applied" should display when browser_archiving_disabled_enforce=1  #12253 and likely we would want to use a same UX solution & similar wording (the modal solution seems fine, or would it be better to use a Notice or Warning notification?)

Refs:

@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Nov 7, 2017
@mattab mattab added this to the 3.2.1 milestone Nov 7, 2017
@sgiehl
Copy link
Member

sgiehl commented Nov 7, 2017

I'm wondering what the easiest way would be to determine if data for as segment hasn't been processed yet. API would return 0 values in this case, but also if there simply were no visits.

@mattab
Copy link
Member Author

mattab commented Nov 7, 2017

it's tricky. it would have to be an "internal" flag or some sort set by the ArchiveProcessor/Loader.php or core/DataAccess/ArchiveSelector.php which would then be accessed down the line somehow?

@sgiehl
Copy link
Member

sgiehl commented Nov 8, 2017

Investigated the archiving process today. As far as I have seen as soon as a segment has been processed a Done-Flag will be stored in the according numeric table. If all plugins were processed a flag like Done+md(segmentString) will be available. So maybe the simplest solution would be to check if the flag is available

@mattab
Copy link
Member Author

mattab commented Nov 19, 2017

So maybe the simplest solution would be to check if the flag is available

Ok. could you try this and let us know if it works nicely?

@mattab mattab modified the milestones: 3.2.1, 3.2.2 Nov 19, 2017
@mattab mattab modified the milestones: 3.5.0, 3.4.1 Mar 26, 2018
@diosmosis diosmosis self-assigned this May 3, 2018
@mattab mattab modified the milestones: 3.5.0, 3.5.1 May 8, 2018
@diosmosis diosmosis removed this from the 3.5.1 milestone May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants