@anonymous-matomo-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' )
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 Member

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-matomo-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


@pdigioia commented on March 29th 2018


@luroguco commented on October 23rd 2019


@tinect commented on December 12th 2019


Powered by GitHub Issue Mirror