In Google Analytics, "Screen Resolution" is a default dimension under Audience > Technology > Browser & OS reports, but pixel density is nowhere to be found.

How can I use Google Analytics to determine how many of my visitors are using Retina or other high-def displays?

3 Answers 3


Google Analytics does not support pixel ratio by default but you can add it with script for a custom variable. See https://github.com/tysonmatanich/GetDevicePixelRatio for more details.


Lets turn that around and ask why would you care?

Assuming it's to determine if image/icon size is an issue, I've recently tossed all the multiple-resolution icons and replaced them with SVG graphics. Logos and larger non-vector images are all 2x size in a plain <img> tag.

Positive side effects are faster loads (the SVG is in the main style sheet) and easier modification. Haven't encountered any negative side effects yet.

If IE8 compatibility is required I will run one sprite file - make one page with all your icons and you can just screencapture it for instant sprites.

  • 2
    You should care as if there's no high pixel ratio users, then sending everyone 2x sized images is a grand waste of everyone's time and resources. Also if everyone happens to be using 3x pixel ratio devices, then you still aren't providing full res pictures to your user base.
    – andrewb
    Commented Mar 26, 2015 at 22:30
  • 2
    Some typefaces (esp if you are considering system fonts to maximize application performance) look great on retina displays, but terrible on standard resolution displays. We're considering this very thing for github.com right now. Commented Jun 9, 2016 at 15:03
  • How do you convert photos to SVG? Commented Jan 12, 2018 at 10:46
  • I care because I have some scaled down images that just look bad on 1x screen due to antialiasing and it's a pain to fix. So I want to see how many users are actually on 1x screens to see if it's worth fixing it or not. The image looks great on 2x screens because you just don't see the differnce. Commented Feb 8, 2023 at 7:47

Well, you can look at the Operating System of your users, if it's an iOS or Macintosh you can assume they use retina displays.

  • Is this true of all Macs? At what point did this become always true?
    – John Conde
    Commented Jan 24, 2018 at 13:29
  • 1
    it's NOT true on all Mac OS - for example, Macbook Air has no retina display and is a popular laptop. Commented Aug 3, 2018 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.