This plugin collects statistics on the device pixel ratio of the visitor's devices. This is useful to analyze how many visitors have Retina or other high DPI displays. Find the respective report in the Visitors - Devices section. You can switch to "Device Pixel Ratio Ranges" to see what share of visitors has a device pixel ratio of up to 1.00, 2.00, and so on. Also, the screen resolution in the visitor log is augmented with the device pixel ratio (abbreviated to DPR there).

The measurement is based on the window.devicePixelRatio browser variable, which is supported by all modern browsers. Note that also a full page zoom different from 100% changes the device pixel ratio. A user setting the zoom to 200% on a regular screen will be counted in the same way as a user having a Retina display with 100% zoom. Still, the user with 200% zoom would also benefit from higher DPI assets.

The device pixel ratio is stored with two decimals accuracy. For browsers not reporting the device pixel ratio, and for visits having occurred before the installation of this plugin, we report the value "Unknown".

Shouldn't the plugin analyze the pure device pixel ratio, wihtout taking the zoom into account?

I do not think that you can query the browser for neither the full page zoom nor the pure pixel device ratio, window.pixelDeviceRatio gives you both at the same time.

What if the device pixel ratio changes during the visit (e.g. by the user changing the full page zoom level)?

The plugin records the device pixel ratio at the beginning of each visit, later changes are ignored. I might think about an option for taking the value for the last action instead, if you provide me with very good arguments for that.

An unknown device pixel ratio is reported for all visitors. What is wrong?

This plugin needs to add a snippet to the JavaScript code that make the browser report visitor actions. To allow this addition, piwik.js must be writable in you installation ("Writable JavaScript Tracker" in System Check must be checked). As the script might be cached on client side, it might take a while until all clients will correctly report the device pixel ratio. If you report the actions using some other API, add "devicePixelRatio=1.23" to the arguments.

  • Device Pixel Ratio Ranges Report

  • Device Pixel Ratio Report

Please share