Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
mattab opened this Issue · 63 comments

5 participants

@mattab
Owner

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

@mattab
Owner

at the same time, should we fix #1125 ?

@anonymous-piwik-user

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.

@mattab
Owner

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

@anonymous-piwik-user

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

@mattab
Owner
  • 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

@tsteur
Owner

In 7c15116: refs #1816 return ratio in API

@tsteur
Owner

In 06cfef9: refs #1816 display ratio on hover

@tsteur
Owner

In 4eba9c5: refs #1816 prevent line break

@tsteur
Owner

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

@tsteur
Owner

In a782e06: refs #1816 only calculate it for reports having a dimension

@tsteur
Owner

In 552874c: refs #1816 ratio calculation should be a bit faster this way

@tsteur
Owner

In 721eac9: refs #1816 small ui tweak, align percentage value right

@tsteur
Owner

In 4cec24f: refs #1816 use a gray that we already use somewhere else

@tsteur
Owner

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

@tsteur
Owner

In bb0e02d: refs #1816 display tooltip which explains percentage value in detail

@tsteur
Owner

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

@tsteur
Owner

In e9e0c46: refs #1816 only display the first 40 chars of the label

@tsteur
Owner

In 57a0a86: refs #1816 coding style

@tsteur
Owner

In eaf9951: refs #1816 reportTotal is clearer instead of total

@tsteur
Owner

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

@tsteur
Owner

In 4c87bcd: 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

@tsteur
Owner

In 4d4cbf4: 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

@tsteur
Owner

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

@anonymous-piwik-user

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!

@tsteur
Owner

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

@anonymous-piwik-user

Me too on the unsubscribe.

@gaumondp

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

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

Dali

@tsteur
Owner

In c097f42: 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

@tsteur
Owner

In 1226e65: 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

@anonymous-piwik-user

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).

@tsteur
Owner

In 71ca6dc: refs #1816 prevent from displaying percentage value in a new line

@mattab
Owner

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

@tsteur
Owner

In 0ea27f7: refs #1816 added translation key

@anonymous-piwik-user

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 ;-)

@tsteur
Owner

In 53825ab: refs #1816 code improvements

@tsteur
Owner

In e9b13b9: refs #1816 some more code cleanup

@tsteur
Owner

In 07ea504: 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

@tsteur
Owner

In 7c88615: refs #1816 we do not always get a datatable

@tsteur
Owner

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

@tsteur
Owner

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

@tsteur
Owner

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

@tsteur
Owner

In 6a262d7: refs #1816 a third way to detect apiModule and apiAction

@tsteur
Owner

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

@tsteur
Owner

In 04a4be4: refs #1816 request only needed columns

@tsteur
Owner

In bb310be: refs #1816 API.get wants a separate columns param

@tsteur
Owner

In d0d556d: refs #1816 align percentage values right

@tsteur
Owner

In f44419a: 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

@tsteur
Owner

In 8b850af: refs #1816 added a comment that explains the condition

@tsteur
Owner

In 2f43ad2: refs #1816 processedReport returns reportTotal, this should fix most of the tests

@tsteur
Owner

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

@tsteur
Owner

In 06a3f72: refs #1816 update position of row action icons when displaying percentage values

@tsteur
Owner

In 0b4b359: refs #1816 make sure percentage values does not get bold

@tsteur
Owner

In 7902a50: refs #1816 apply the change only to the current table, not to child tables

@tsteur
Owner

In 4c2f20e: refs #1816 allow wrap in visitorlog

@tsteur
Owner

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

@tsteur
Owner

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

@tsteur
Owner

In d2252c6: refs #1816 the label should not wrap while the column should

@tsteur
Owner

In e3b157d: refs #1816 make sure selector is applied in widget

@tsteur
Owner

In 51da78c: refs #1816 make sure we always get a result by disabling filters

@tsteur
Owner

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

@mattab
Owner

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

@mattab
Owner

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!

@mattab mattab added this to the 2.0 - Piwik 2.0 milestone
@mattab mattab self-assigned this
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 return ratio in API 7c15116
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 display ratio on hover 06cfef9
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 prevent line break 4eba9c5
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 made it a bit more generic, request first level table only…
… if needed, handle ecommerce columns
6a77087
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 small ui tweak, align percentage value right 721eac9
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 use a gray that we already use somewhere else 4cec24f
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 do not create metrics for ratio, instead add total values …
…to tableMetadata and generate ratio in view
4793bc7
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 it is a bit better readable this way, need to create a tra…
…nslation
c6240e6
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 only display the first 40 chars of the label e9e0c46
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 coding style 57a0a86
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 reportTotal is clearer instead of total eaf9951
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur 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
4c87bcd
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 this should set the correct value in case we are dealing w…
…ith dataTable\maps, probably there will be still an issue with idSubtables
4d4cbf4
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 this should fix calculation in case we are dealing with a …
…datatable\map and a subtable
803c3bc
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 we always have to request the first level table to make su…
…re we get all rows, not only the filtered ones
5e56949
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur 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
c097f42
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 do not display second part of the tooltip if the total val…
…ue is smaller than the report value to workaround reportTotalUniquePageviews are compared with Visits because UniquePageviews uses metric nb_visits
1226e65
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 added translation key 0ea27f7
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 code improvements 53825ab
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 some more code cleanup e9b13b9
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur 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
07ea504
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 we do not always get a datatable 7c88615
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 this should fix if CustomVariables report is requested fla…
…t over API.getProcessedReport
9951b2e
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 make sure we get a date string and not an array of date st…
…rings in case for instance when handling period=month
75b9039
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 i am really wondering why we sometimes do not get method a…
…nd module
079f1a8
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 a third way to detect apiModule and apiAction 6a262d7
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 request only needed columns 04a4be4
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 API.get wants a separate columns param bb310be
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 align percentage values right d0d556d
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur 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
f44419a
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 added a comment that explains the condition 8b850af
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 processedReport returns reportTotal, this should fix most …
…of the tests
2f43ad2
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 made it smoother on ie8 by only performing style/class cha…
…nges when needed
6aef2b7
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 update position of row action icons when displaying percen…
…tage values
06a3f72
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 make sure percentage values does not get bold 0b4b359
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 allow wrap in visitorlog 4c2f20e
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 #4330 label is already escaped by safeDecodeLabel, to not …
…escape: otherwise error message non utf8 character might occur
76f538a
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 make sure selector is applied in widget e3b157d
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@tsteur tsteur refs #1816 if there is no data to display, we do not need to request …
…API summary as there will be no tooltip anyway
79ee57e
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.