Client Device Detection for IE in compatibility mode

We wanted to track MS IE in compatibility mode for one of the sites we track with Piwik. The client has IE set to force compatibility mode (IE7 emulation) for IE 8, 9, and 10. The best solution I found was changing the browsers.yml file location at vendor/piwik/device-detector/regexes/client. I changed the file to track IE 8 in compatibility mode as IE 7.8, IE 9 as 7.9, and IE 10 as 7.10. The change is easy to track, as the User Agent reports IE7, but different versions of the Trident engine. The blocks are inserted BEFORE the IE 8 check.

Here are the changes I made:

  • regex: 'MSIE 7.*Trident/4.0’
    name: 'Internet Explorer’
    version: 7.8
    engine:
    default: ‘Trident’
  • regex: 'MSIE 7.*Trident/5.0’
    name: 'Internet Explorer’
    version: 7.9
    engine:
    default: ‘Trident’
  • regex: 'MSIE 7.*Trident/6.0’
    name: 'Internet Explorer’
    version: 7.10
    engine:
    default: ‘Trident’

With the support and approval of Piwik and the community, is it possible to include the changes in future versions of Piwik? Or at the very least, as an optional set of browser checks?

Any suggestions of other methods to track IE in compatibility mode are greatly appreciated.

Feel free to suggest any changes here (via an issue or pull request): GitHub - matomo-org/device-detector: The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.