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

Record real device resolution and devicepixelratio #11405

Open
m0uH opened this issue Feb 23, 2017 · 4 comments
Open

Record real device resolution and devicepixelratio #11405

m0uH opened this issue Feb 23, 2017 · 4 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@m0uH
Copy link

m0uH commented Feb 23, 2017

I think it's really confusing if UHD devices like 4k monitors and smartphones get listed under visitor devices with the "wrong" resolution. As stated in #10296 it does make sense from a website point of view but in this way you can't differentiate between HiDPI devices and normal devices. E.g. it could be worth or necessary to provide images on a website with higher resolutions if more and more users with HiDPI displays are going to visit a website. With the current state this could not be tracked.

A solution could be to simply record both, the real screen resolution, which should also be presented under the device informations, and the "actual" resolution / viewport size.

@tsteur
Copy link
Member

tsteur commented Feb 23, 2017

A devicePixelRatio report could be good as well 👍

@mattab mattab added this to the Backlog (Help wanted) milestone Mar 21, 2017
@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Mar 21, 2017
@johsin18
Copy link
Contributor

So I have implemented a plugin for reporting statistics on the device pixel ratio here:
https://github.com/johsin18/DevicePixelRatioMatomoPlugin

It does not change the screen resolution report at all. This is how it should stay IMHO, it would make sense though to rename "Screen Resolution" to "Screen Size (in CSS pixels)".

A code review of my plugin by an expert would be appreciated. I'm currently testing it on my private Matomo instance, it seems to work fine. If everything goes well, I would enroll it to the Marketplace in a week or so.

@johsin18
Copy link
Contributor

I have published the plugin now. @tsteur @sgiehl a code review would still be appreciated.

@GreenReaper
Copy link

GreenReaper commented Jan 9, 2019

This is useful, but the combination of this and the existing CSS pixels to provide statistics on the "actual" screen resolution would be even more useful. Then we could have a better idea of what srcset images will be used, since if you have a fixed viewport it can be scaled to the device resolution. Any device can advertise a 4.0 device pixel ratio, but if it has 320 width it is equivalent to a 2.0 dpr with a 640 width.

I imagine this'd be relatively trivial to calculate and display as a separate table from non-archived data, as hinted at in this comment. Archived history would be useful too, to show changes over time.

As noted the regular table "screen resolution" is now misleading because it doesn't list screen resolutions, but instead the number of CSS pixels. For designers this may be useful, but knowing the actual screen resolution is important when deciding the appropriate size of image resources and videos to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

5 participants