I know screen resolution is already logged, but not everyone runs their browser maximized. I'd like to see reports on the actual browser window size. I have sample javascript code that will collect that data.
function getBrowserWindowSize()
{
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' )
{
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
}
else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
{
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
}
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
{
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
return {width:myWidth, height:myHeight};
}
Keywords: browser size
Thank you for the suggestion and code. While this may seem like a trivial request, this feature still requires changes to the protocol, Tracker (and Generator), new widgets, archiving, etc.
It might be better to incorporate this into #73 (which collects this information already) or #802 (which is about usability testing).
alternatively, this could be a Javascript tracking API option, eg.
piwikTracker.detectResolutionAsWindowSize ```
but agreed with vipsoft that this as a new plugin would be better...
For web developers the actual screen size is a lot more useful than the screen resolution.
This is, in my opinion, important enough to be in core.
This ticket ist nearly 6 years old but more relevant than ever with mobile web taking over and most sites being responsive by now. Any chances this will be fixed soon?
+1 @bxt