@mattab opened this Issue on September 14th 2014 Member

The goal of this issue is to help users who have poor experience of Piwik by detecting when it happens and displaying a help notification to guide them in right direction.

Problem: Piwik loads stats slowly for many users when Browser trigger archiving is enabled in settings. It affects mostly

Suggested tasks

  • In the Dashboard and All Websites dashboard, detect when stats take more than a few seconds to load and display inline notification suggesting to solve the issue.
  • The notification message can change depending on the use case:
    1. when browser archiving is enabled, recommend user to setup Cron archiving
    2. when segments are used, and it's not set to pre-processed, explain that it's recommended to set segments to be pre-processed.
    3. when a custom date range is used, explain that they are not pre-processed and can be slow. Recommend user to use Weekly/Monthly/Yearly reports if problem persists.
      • in case user selects to load by default a date range eg. Last 30 days then we should pre-process it anyway, see #6672

How often should the notification be displayed? if the user closes the notification, maybe it could be displayed again in one week. The notification should be displayed to all users but messaging should change for Super User to recommend them to change the settings or setup cron (for normal users it would recommend to contact the Piwik Administrator to let them know of the issue and suggest them to tweak Piwik).

Who is affected by issue?
Almost all users by default will experience this issue sooner rather than later. By default the automated cron is not setup and user has browser archiving enabled in piwik settings. by default we load Today, and All websites can also load the Last 30 days, so the user will request a lot of fresh data most of the time!

Maybe you have other ideas?

@gaumondp commented on September 16th 2014

Two small notes:

  1. While this is extreme for some, the plugin RerUserDates (http://plugins.piwik.org/RerUserDates) comes handy if you don't want your users to be able to chose the heavy crunching "Date range" and "today" reports in calendar.
  2. Notification messages should be take with care. Is this Admin only? Is it showed once and never see again until next Piwik update? Do we show it every time like the annoying Zen mode notification (at least in 2.4)?

I'm not sure what is default date selection but for sure having "yesterday" in general would be better default than "today".

@mattab commented on November 20th 2014 Member

Today we got again some user feedback of frustration at the slowness of the All Websites dashboard, here it is:

This All Sites STILL does not work. Nine times no, once yes. PHP has got 512 MB RAM, no errors are shown … it’s kinda joke. This is from the beginning crippled. The old Piwik worked, since this new – broken by design!

In some way it's true that it's broken by design because we do not tell users if they don't look in the settings or the docs.

Because we all know the issue can be solved by setting up the cron, I've added a Major tag to this issue and updated the description to describe a specific change we could make: Detect when stats take more than a few seconds to load and display inline notification suggesting to solve the issue.

@mattab commented on April 27th 2015 Member

from forum feedback: http://forum.piwik.org/read.php?2,125969,page=1#msg-126260

I'd regard myself as a representative user. I can follow the install instructions, but they took me a lot longer than 5 minutes. I am not a Linux wiz. I may be mistaken, but I am pretty sure they don't conclude with set-up the cron for auto-archiving otherwise I would have tried or paid someone to help me. My suggestion is that you do add this setup to the instructions. I think it will provide a better experience to your users, and as far as I can tell, there is no downside.

Maybe we could also double check the wording in installer. Right now it says "setup the cron if you have a high traffic website" or so, instead we could make it clear that it's important for fast Piwik experience to setup the cron for most websites (except for very low traffic Piwik.)

@mattab commented on January 27th 2016 Member

FYI: not sure how this could be implemented... Could we hook into our ajax global queue, and/or the AngularJS http queue, to detect if any pending request is taking more than N ~ 15 seconds?

Here is something maybe relevant for this problem: for our UI tests we had to check whether all HTTP requests are finished. When all HTTP are received by the browser then only we can take a screenshot as we know everything is loaded. This wasn't working well in PhantomJS and this is why we had to use our global ajax queue and angular HTTP queue. See the magic code in the UI test helper code: https://github.com/piwik/piwik/blob/2.16.0-rc1/tests/lib/screenshot-testing/support/page-renderer.js#L503-L520

Powered by GitHub Issue Mirror