Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

New reports: Browser and Operating system market shares #2895

Closed
mattab opened this Issue · 13 comments

3 participants

@mattab
Owner

Currently Piwik reports

  • Browser family, Gecko VS Webkit VS IE vs Opera: useful for web developers since the engine impact the way pages are rendered
  • Browser versions: FF 8, IE 7, etc. Useful to know exactly what browsers are used

It would be nice to also provide Browser marketshare: FF Vs IE Vs Opera Vs Chrome Vs Safari Vs others.

  • This would be useful to answer the general geek question "Who is winning?"
    • It might be a bit too much to yet another report about browsers in Visitors > Settings report already a bit crowded.
    • Maybe The User Interface could be a button to access the other report, in a footer message for example "Switch to Browser Marketshare report" / "Switch to Browser versions report"
    • The report would be aggregated from the Browser versions datatable and in fact will be a "View" of this other report. It will not require a new archiving process. The API will call std API and extract browser name and re-aggregates.

This would be IMO a very useful new Piwik report and would not clutter the UI.

This ticket also includes similar work for Operating System Marketshare

  • By default, show Windows XP VS Mac OS X VS Windows 7 VS Android
  • An icon or link allows to display Windows VS Mac VS Linux
  • the new API is simply a view aggregating the existing API
  • there can be new integration tests for the 2 new API functions
@mattab
Owner

We could similarly provide the OS Market share report: Windows VS Mac VS Linux VS Blackberry.

I think that this could be done by simply "aggregating" All windows version together?

Once we do this, it could be relevant to provide breakdown of Mac OS X versions, similarly to the breakdown of Windows versions?

@anonymous-piwik-user

The patch above splits Mac OS X into its various major versions.

@mattab
Owner

It would be nice to do this early rather than later.

It's kind of annoying to see Chome 16 topping the reports just because their updater virus automatically updates everyone ;)

PS: I call the googleupdater.exe virus because I cant get rid of it on my computer, even deleting the scheduled updating task, it's then automatically re-created...

@diosmosis
Collaborator

Attachment: Patch for this issue.
2895.diff.tar.gz

@diosmosis
Collaborator

I've attached a patch for this issue. It adds a two new reports. Notes:

  • This patch includes the GroupBy filter from my patch in #3004 and the related reports code from #3137.
  • I only added one new report for operating systems: getOSFamily. The possible families are in UserAgentParser.php.
  • For the browser report, I modified the existing one to be getBrowserVersion and then added getBrowser. So the browser version report is no longer displayed by default.
  • For the browser report's metadata, I modified the existing metadata entry. There was a comment that said it was only used to define a segment. I'm not sure if modifying this was the correct path, though.
@diosmosis
Collaborator

Attachment: Patch for this issue and issue #3133.
2895.diff.tar.2.gz

@diosmosis
Collaborator

I uploaded an updated patch for this issue. This patch has another report, getDeviceType, which is meant to solve #3133. The report differentiates between desktop OSes, mobile OSes and gaming consoles. The report is set as a related report for the Operating Systems section (not sure where else to put it).

Let me know what you think.

@mattab
Owner

Great patch!! :)
Review

  • plugins/UserSettings/UserSettings.php should also leave the existing widget for "Browser versions" in case users want to embed this widget in their site/app. Currently only the new getBrowserVersion is available as widget
  • did you check new reports work OK in HTML/PDF reports?
  • Piwik core will rely on UserAgentParser english strings. Can you add a comment in UserAgentParser saying eg. "NOTE: don't change any of these or update also code in plugins/UserSettings/functions.php" to make sure we don't forget about it (or changing 'gaming console' to 'gaming' for example would lead to a lot of 'unknowns'
  • WII icon looks better than PS3 imho could we use it for 'gaming' ?
  • in tests/integration/expected/test_OneVisitorTwoVisits__UserSettings.getOSFamily_day.xml the <shortLabel> should be "Win" instead of "Win XP"
  • in +++ tests/integration/expected/test_OneVisitorTwoVisits__UserSettings.getDeviceType_day.xml shortLabel should be Desktop instead of Win XP
  • I didn't check in detail the OS => OS family table - but it looks good

Thanks for these very useful new reports, that users will really appreciate!

@diosmosis
Collaborator

Replying to matt:

Great patch!! :)
Review

  • plugins/UserSettings/UserSettings.php should also leave the existing widget for "Browser versions" in case users want to embed this widget in their site/app. Currently only the new getBrowserVersion is available as widget

Not sure what you mean by this. Do you mean, leave the getBrowser method as it was before (when it reported browser versions)?

@mattab
Owner

I meant that getBrowserVersions and getBrowser should each be available as a widget in the array that defines widgets in UserSettings.php

@mattab
Owner

looking forward to it :)

@diosmosis
Collaborator

(In [6326]) Fixes #2895, #3133, renamed existing report getBrowser to getBrowserVersion, added 3 new reports, getBrowser (browser w/o version), getOSFamily and getDeviceType.

Notes:

  • Modified MetadataCallbackReplace & ColumnCallbackReplace so extra columns could be passed to the callback, w/o being replaced.
  • Modified UserAgentParser.php to provide operating system family extraction functionality.
@mattab mattab added this to the Piwik 1.8 milestone
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.