@anonymous-piwik-user opened this Issue on September 14th 2009

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

@robocoder commented on September 15th 2009 Contributor

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).

@mattab commented on September 22nd 2009 Owner

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...
@anonymous-piwik-user commented on June 19th 2011

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.

@bxt commented on March 9th 2015

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?

@johanholm commented on April 24th 2015

+1 @bxt

@JimmyKuruvilla commented on January 7th 2016

+1

Powered by GitHub Issue Mirror