Skip to content

Commit

Permalink
record actual screen resolution when using JS tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Jul 13, 2016
1 parent f6c3da4 commit b415221
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions js/piwik.js
Expand Up @@ -972,7 +972,7 @@ if (typeof JSON2 !== 'object' && typeof window.JSON === 'object' && window.JSON.
onload, src,
min, round, random,
exec,
res, width, height, devicePixelRatio,
res, width, height,
pdf, qt, realp, wma, dir, fla, java, gears, ag,
hook, getHook, getVisitorId, getVisitorInfo, setUserId, getUserId, setSiteId, getSiteId, setTrackerUrl, getTrackerUrl, appendToTrackingUrl, getRequest, addPlugin,
getAttributionInfo, getAttributionCampaignName, getAttributionCampaignKeyword,
Expand Down Expand Up @@ -5014,8 +5014,7 @@ if (typeof window.Piwik !== 'object') {
java: 'application/x-java-vm',
gears: 'application/x-googlegears',
ag: 'application/x-silverlight'
},
devicePixelRatio = windowAlias.devicePixelRatio || 1;
};

// detect browser features except IE < 11 (IE 11 user agent is no longer MSIE)
if (!((new RegExp('MSIE')).test(navigatorAlias.userAgent))) {
Expand Down Expand Up @@ -5046,8 +5045,8 @@ if (typeof window.Piwik !== 'object') {
browserFeatures.cookie = hasCookies();
}

var width = parseInt(screenAlias.width, 10) * devicePixelRatio;
var height = parseInt(screenAlias.height, 10) * devicePixelRatio;
var width = parseInt(screenAlias.width, 10);
var height = parseInt(screenAlias.height, 10);
browserFeatures.res = parseInt(width, 10) + 'x' + parseInt(height, 10);
}

Expand Down
4 changes: 2 additions & 2 deletions piwik.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b415221

Please sign in to comment.