New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
% of user with Cookie can be more than 100% #7437
Comments
The if (!((new RegExp('MSIE')).test(navigatorAlias.userAgent))) {
if (navigatorAlias.mimeTypes && navigatorAlias.mimeTypes.length) {
// ... look in navigator.mimeTypes
}
...
// other browser features
browserFeatures.cookie = hasCookies();
} full code here: https://github.com/piwik/piwik/blob/master/js/piwik.js#L3996-4022 However IE 11 does not report itself as Anyway now the problem is that we have IE11 cookies stats recorded. But in the "Plugins" report we do this: $visitsSum = $visitsSumTotal - $ieVisits; full code here: https://github.com/piwik/piwik/blob/master/plugins/DevicePlugins/API.php#L77-77 Which means we calculate the percentage over all the visits that are not IE (but IE 11 did report cookie usage). Which leads to a total greater than 100%… I don't see a perfect way to fix this, here are options:
I think the last solution is the best as it would also allow to have realistic % for any other browser that doesn't support getting supported plugins. It would also allow to show 2 percentages: the % for visits that were correctly detected and the % for all the visits (e.g. 80% browsers support Java but it's 50% in total if we include visits where we can't detect the feature). However it requires changing the tracker (and probably other extensive changes), and it wouldn't be backward compatible with data previously recorded… @mattab @sgiehl do you see any other solution, or do you have a preference with the one I exposed? |
Good find... it's a tricky one to decide the best way forward.
does the plugin detection start working for IE11 as well as the cookie detection? (it uses different JS code (cookes detected with |
Scratch that I didn't look hard enough, mimeTypes is supported in IE11: https://msdn.microsoft.com/en-us/library/ie/dn423948(v=vs.85).aspx It's confusing though because the link to the documentation leads to this: https://msdn.microsoft.com/en-us/library/ie/hh801965(v=vs.85).aspx |
…lugins In piwik.js we exclude IE browsers by using the `MSIE` string in the user agent. However IE11 doesn't use that user agent anymore, which means we record plugin usage for IE11, which lead to % > 100%. Now we exclude only IE6, 7, 8, 9, 10.
Pull request here: #7469 |
The goal of this issue is to fix the bug where the "% visits with Cookie support" sometimes shows more than 100%. this can be seen in the demo here.
The text was updated successfully, but these errors were encountered: