Opened 3 years ago

Closed 4 months ago

#1816 closed New feature (fixed)

Add a new column in all reports for % percentage of visits

Reported by: matt Owned by: matt
Priority: critical Milestone: 2.0 - Piwik 2.0
Component: UI - UX (AngularJS, twig, less) Keywords:
Cc: Sensitive: no

Description (last modified by matt)

From email "I have always missed the simple ability to view the stats in percentages (as a third column). Most of the time, the percentage (let's say the percentage of mobile users as an example) is much more useful than the absolute numbers."

This would be a simple yet very useful add to Piwik.
Some challenges are:

  • do we display % visits, % unique visitors or % pages? not obvious, even though % visits is the most commonly useful.
  • do we add a new column in all widgets (in dashboard), or only in the main reports (when clicking on the menu)? Adding a new column in all widgets is a 'major' presentation change, but maybe worth it.
  • Add % visits, normalized data, in the Row Evolution report, useful to compare eg. browser usage share #3729

Change History (78)

comment:1 Changed 3 years ago by matt (mattab)

at the same time, should we fix #1125 ?

comment:2 Changed 3 years ago by bolero

I would like to extend this feature request to all widgets where it makes sense. I'm missing such a feature for many widgets heavily.

For instance Browsers or Visitor Continent, Countries, Search engines, Keywords, Referrers (external websites). e.g. percentages for the first 10 entries (Browsers widget calls this "low population") and a percentage for all others.

I'm also missing a figure for the totals, this could be displayed either in the title of a widget (e.g. "Visitor browsers (Total: nnnnn)" or in the first row of the first column that shows the column name (e.g. "Browser: Total: nnnn) or as the first data row ("All browsers ......"). I think the last version would be the one that fits all purposes because there's often more data than just one column (e.g. with browsers you can also show Actions, Bounce Rate etc.), so the display as a normal extra first data row would make for the best display.

Without percentages and totals the figures miss a lot of "interpretability". I can see trends and evolution, but I don't have statistics to which "groups" I cater unless I get my calculator and crush numbers myself.

comment:3 Changed 3 years ago by matt (mattab)

  • Milestone changed from 1.2 Piwik 1.2 to 1.3 - Piwik 1.3
  • Owner set to matt

comment:4 Changed 3 years ago by matt (mattab)

  • Priority changed from normal to major

Could we have the column also have a vertical bar in the background, or width proportional to the % ? that would allow visual overview of importance of each row

comment:5 Changed 3 years ago by hads

I too would much like to view stats as percentages. I really miss this when trying to quickly compare browser versions etc.

comment:6 Changed 3 years ago by matt (mattab)

  • Milestone changed from 1.7 Piwik 1.7 to 1.6 Piwik 1.6

comment:7 Changed 3 years ago by matt (mattab)

  • Maybe we put the % visits next to Visits, in the same cell, in light grey? So that it is visible only when you look for it, otherwise does not add complexity or clutter to the UI? Add on sorted column only.
  • NOTE: see function addVisitsPercentColumn
  • This should also show up in scheduled report
  • Should be a new column, and shows Metadata, Piwik Mobile, Email reports, in reports where it makes sense

comment:8 Changed 3 years ago by matt (mattab)

  • Milestone changed from 1.6 Piwik 1.6 to 1.6.x Piwik 1.6.x

comment:9 Changed 2 years ago by matt (mattab)

  • Milestone changed from 1.7 Piwik 1.7 to 1.8 Piwik 1.8

comment:10 Changed 2 years ago by matt (mattab)

  • Milestone changed from 1.8 Piwik 1.8 to 1.7.x - Piwik 1.7.2

comment:11 Changed 16 months ago by matt (mattab)

  • Priority changed from major to critical

comment:12 Changed 16 months ago by matt (mattab)

  • Milestone changed from 1.9.x - Piwik 1.9.x to 1.9.3 - Piwik 1.9.3
  • Owner changed from matt to capedfuzz
  • Priority changed from critical to major

comment:13 Changed 14 months ago by matt (mattab)

  • Description modified (diff)

comment:14 Changed 13 months ago by DaSch

+1

comment:15 Changed 13 months ago by matt (mattab)

  • Milestone changed from 1.12 - The Great 1.x Backlog to 2.x - Piwik 2.x

comment:16 Changed 8 months ago by matt (mattab)

  • Priority changed from major to critical

comment:17 Changed 5 months ago by matt (mattab)

  • Milestone changed from 2.x - Piwik 2.x to 2.1 - Piwik 2.1
  • Priority changed from critical to major

comment:18 Changed 5 months ago by matt (mattab)

  • Milestone changed from 2.1 - Piwik 2.1 to 2.0 - Piwik 2.0
  • Owner capedfuzz deleted

comment:19 Changed 5 months ago by tsteur

  • Owner set to tsteur
  • Status changed from new to assigned

comment:20 Changed 5 months ago by matt (mattab)

  • Priority changed from major to critical

comment:22 Changed 5 months ago by tsteur

In 06cfef9349120c0789ae9389360d4514dd6ba107:

refs #1816 display ratio on hover

comment:24 Changed 5 months ago by tsteur

In 6a770878468361ff417728989cf3988c5f7acbd8:

refs #1816 made it a bit more generic, request first level table only if needed, handle ecommerce columns

comment:25 Changed 5 months ago by tsteur

In a782e066065c4e81ef4d76b91b88344722370015:

refs #1816 only calculate it for reports having a dimension

comment:26 Changed 5 months ago by tsteur

In 552874c2f117b19944f00f4a9c1cd63125b68683:

refs #1816 ratio calculation should be a bit faster this way

comment:27 Changed 5 months ago by tsteur

In 721eac951a5b98df12b34cc518a43889f11abc44:

refs #1816 small ui tweak, align percentage value right

comment:28 Changed 5 months ago by tsteur

In 4cec24f6b8db0a8d65952cb837ea8632ec5cc3a4:

refs #1816 use a gray that we already use somewhere else

comment:29 Changed 5 months ago by tsteur

In 4793bc774656c59df6a48eed239f72718570ac35:

refs #1816 do not create metrics for ratio, instead add total values to tableMetadata and generate ratio in view

comment:30 Changed 5 months ago by tsteur

In bb0e02d21541125eca23ba0256b3a3cde3db262c:

refs #1816 display tooltip which explains percentage value in detail

comment:31 Changed 5 months ago by tsteur

In c6240e6cfc071d8f051025c9e015d827fdf99cfc:

refs #1816 it is a bit better readable this way, need to create a translation

comment:32 Changed 5 months ago by tsteur

In e9e0c46200c5c31ac0e1301700ac91c0a833ca84:

refs #1816 only display the first 40 chars of the label

comment:34 Changed 5 months ago by tsteur

In eaf995140d08116e97c872087a3e44488f67da4f:

refs #1816 reportTotal is clearer instead of total

comment:35 Changed 5 months ago by tsteur

In b0d7a5cff22b7b1d6591aad3d0f975411d7cbc92:

refs #1816 should not make any difference but make sure we get all rows

comment:36 Changed 5 months ago by tsteur

In 4c87bcd83848707099df96bf5b1ac59ae55e5eb1:

refs #1816 do not set an API request for each datatable, only request once, it is still not 100% right as the same total value is set for each dataTable

comment:37 Changed 5 months ago by tsteur

In 4d4cbf4412e050ad1d29633b1d06d0cac97ca59b:

refs #1816 this should set the correct value in case we are dealing with dataTable\maps, probably there will be still an issue with idSubtables

comment:38 Changed 5 months ago by tsteur

In 803c3bc6d4d2fb67150c9c678c72b8346539015a:

refs #1816 this should fix calculation in case we are dealing with a datatable\map and a subtable

comment:39 Changed 5 months ago by bolero

Please, is there a way to stop the email for each single edit? I did not subscribe to any of this and I can't find an option to unsubscribe in settings of this trac account. If there is a way, please unsubscribe me silently. Thanks!

comment:40 Changed 5 months ago by tsteur

In 5e569492e8ee822b66477318d73a56a790207703:

refs #1816 we always have to request the first level table to make sure we get all rows, not only the filtered ones

comment:41 Changed 5 months ago by hads

Me too on the unsubscribe.

comment:42 Changed 5 months ago by dalidev

Guys, to unsubscribe I think you just need to go there:

http://lists.piwik.org/cgi-bin/mailman/listinfo/piwik-trac

Dali

comment:43 Changed 5 months ago by tsteur

In c097f42a0f6af9d1dc8a76d933d3535e4ec7a908:

refs #1816 by generating total values before the generic filters, we only have to request the first level dataTable in case it is a subtable

comment:44 Changed 5 months ago by tsteur

In 1226e65115d37dd8b87f96c4c75f090d9424e59c:

refs #1816 do not display second part of the tooltip if the total value is smaller than the report value to workaround reportTotalUniquePageviews are compared with Visits because UniquePageviews uses metric nb_visits

comment:45 Changed 5 months ago by bolero

Thanks, but this doesn't work. And, after thinking, I don't see why I should be on this list at all. In that case I would get every single message to the list, not just the tickets I'm attached to. It must be trac doing this. Mailman adds certain mail headers to each message it sends out. Those mails don't have any. These mails come from trac, not mailman, and there is no way to stop it. I devalidate my email address in there now (if I can).

comment:46 Changed 5 months ago by tsteur

In 71ca6dca62b48adf009acd9eac7d7b7e6dd56f6d:

refs #1816 prevent from displaying percentage value in a new line

comment:47 Changed 5 months ago by matt (mattab)

Hi guys,

It is a "trac" feature that people are emailed the replies and there is no way for you to unsubscribe. Sorry about that (maybe we move away from trac in the future for few reasons such as this), you can setup a filter in emails to ignore messages from this ticket or trac. cheers

comment:49 Changed 5 months ago by bolero

Changing my address to a non-existant one worked, thanks. That's good enough. I didn't mind getting the one or the other mail every few weeks or months, but getting dozens within a day was a bit much ;-)

comment:51 Changed 5 months ago by tsteur

In e9b13b9876407addd295c712f6f8aaa1f8d9dc84:

refs #1816 some more code cleanup

comment:52 Changed 5 months ago by tsteur

In 07ea504831bae7e9bc82e5cbed0d62a939179919:

refs #1816 make sure apiMethod and apiModule is set. This seems to be not the case for instance if flat=1. Reproduceable if clicking flatten in custom variables

comment:53 Changed 5 months ago by tsteur

In 7c886155763fa5940d787f02eca1fe012a7204c4:

refs #1816 we do not always get a datatable

comment:54 Changed 5 months ago by tsteur

In 9951b2ef858ac152621291b5e374739e489bb9a8:

refs #1816 this should fix if CustomVariables report is requested flat over API.getProcessedReport

comment:55 Changed 5 months ago by tsteur

In 75b9039c253bf0f4fca940438835e61ad8fb9327:

refs #1816 make sure we get a date string and not an array of date strings in case for instance when handling period=month

comment:56 Changed 5 months ago by tsteur

In 079f1a8139d08066d0bea22d6264ecb2a65ce87e:

refs #1816 i am really wondering why we sometimes do not get method and module

comment:57 Changed 5 months ago by tsteur

In 6a262d758685f75020507d3cc0f974ea17d4c7fa:

refs #1816 a third way to detect apiModule and apiAction

comment:58 Changed 5 months ago by tsteur

In e048d2e9d0b8a96b65e20924d41cbfe95b2f08db:

refs #1816 do not pass variable by reference, leads to weird issues

comment:59 Changed 5 months ago by tsteur

In 04a4be498c905990abd5d6c5e0334be575ebad83:

refs #1816 request only needed columns

comment:60 Changed 5 months ago by tsteur

In bb310be544bd22255e38c71de5e68baa2e3424f0:

refs #1816 API.get wants a separate columns param

comment:61 Changed 5 months ago by tsteur

In d0d556d2c93f85676ec06453b1374ee2e4bda05d:

refs #1816 align percentage values right

comment:62 Changed 5 months ago by tsteur

In f44419aba536c4546ba0bc66786c2a46ed7e17fd:

refs #1816 do not calculate totals in case apiModule or apiMethod is not set. This means basically "do not run datamanipulators". It happens for instance when flat is enabled and it tries to load all subtables, there should be no need to calculate the datatable for each of those then

comment:63 Changed 5 months ago by tsteur

In 8b850af44746171fa546737f869d66053a0001f8:

refs #1816 added a comment that explains the condition

comment:64 Changed 5 months ago by tsteur

In 2f43ad2f37103954fab2efa961262c3bd2ac775f:

refs #1816 processedReport returns reportTotal, this should fix most of the tests

comment:65 Changed 5 months ago by tsteur

In 6aef2b7787330d9530fef55b1d60155e53042895:

refs #1816 made it smoother on ie8 by only performing style/class changes when needed

comment:66 Changed 5 months ago by tsteur

In 06a3f7293aaed50e6f76f6c4541e3ffb302ab655:

refs #1816 update position of row action icons when displaying percentage values

comment:67 Changed 5 months ago by tsteur

In 0b4b35928c1f7ad2f35c7606e045e6ddd3923e0f:

refs #1816 make sure percentage values does not get bold

comment:68 Changed 5 months ago by tsteur

In 7902a50a77fa33aaaf5b093e83f45293745cfa97:

refs #1816 apply the change only to the current table, not to child tables

comment:69 Changed 5 months ago by tsteur

In 4c2f20ede6da2fac659e90e0527a4bcb00ede39f:

refs #1816 allow wrap in visitorlog

comment:70 Changed 5 months ago by tsteur

In ae07b43d1513b96bc5a549e23d810f9796fa0971:

refs #1816 the label is already escaped, do not escape again

comment:71 Changed 5 months ago by tsteur

In 76f538a46ff5319414495d455b9be0b9acf287d5:

refs #1816 #4330 label is already escaped by safeDecodeLabel, to not escape: otherwise error message non utf8 character might occur

comment:72 Changed 5 months ago by tsteur

In d2252c698a2daf66dcd10bdef12e54856d1a06fd:

refs #1816 the label should not wrap while the column should

comment:73 Changed 5 months ago by tsteur

In e3b157d5a3f654841fddb2829a72c0be3fef22ab:

refs #1816 make sure selector is applied in widget

comment:74 Changed 5 months ago by tsteur

In 51da78c1e47e901d0cd84440fe34e467eb65c996:

refs #1816 make sure we always get a result by disabling filters

comment:75 Changed 5 months ago by tsteur

In 79ee57e8ae628958b65b9b95235fa2650bdc1972:

refs #1816 if there is no data to display, we do not need to request API summary as there will be no tooltip anyway

comment:76 Changed 5 months ago by matt (mattab)

In 1fe8319c9bc41b392be49f57f8687d30b9a11331:

Removing margin-top: as it makes the Row "jump" few pixels high when hovering Refs #1816

comment:77 Changed 4 months ago by matt (mattab)

  • Owner changed from tsteur to matt
  • Status changed from assigned to new

comment:78 Changed 4 months ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

Awesome first version of a percentage visits feature.

I hope in a next version we can add the "line" solution as well.

Also may be interesting if we could "fade in" the column when they expand when displaying the % columns.

Well done Thomas for bringing it to life.

I love this feature already!

Note: See TracTickets for help on using tickets.