I finally found a solution ... but only for Google Analytics. You have to set up a custom segment in Analytics to pick up that variable:
var pixelRatio = (window.devicePixelRatio >= 1.5) ? "high" : "normal";
_gaq.push(['_setCustomVar', 3, 'PixelRatio', pixelRatio, 2 ]);
But i won`t use Google Analytics! Has anyone an idea - how is it possible to implement such a thing in Piwik?
var pixelRatio = (window.devicePixelRatio >= 1.5) ? "high" : "normal";
_gaq.push(['_setCustomVar', 3, 'PixelRatio', pixelRatio, 2 ]);
But i won`t use Google Analytics! Has anyone an idea - how is it possible to implement such a thing in Piwik?