matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.64k stars 2.62k forks source link

Request: Show Browser Engine Version #21782

Open pbb72 opened 8 months ago

pbb72 commented 8 months ago

Currently, Matomo reports Browser usage (optionally with version number) and Browser Engine (Blink, WebKit, Trident, Gecko, etc) usage.

Regrettably, the browser engine information is relatively useless without also knowing the relevant version number. I can't use the browser version numbers, because on iOS all browsers use the WebKit rendering engine, making the browser version number irrelevant for all browsers but Safari.

Summary

Could it be possible to provide a Browser Engine Version table just like we have a Browser Version table?

Your Environment

sgiehl commented 8 months ago

Matomo currently does not store the browser engine version. Therefore it's not easily possible to add that. Device detector should already be able to detect that, so it's about adding a new dimension to store the data and according reports. I doubt this will be implemented in core any time soon, as there hadn't been many requests around that topic and there is more important stuff to do at the moment. But this could be easily handled in a custom plugin. So if you are keen, you could try to build you own plugin doing that.

pbb72 commented 8 months ago

I've created a custom visit dimension filled with the following Custom JS variable, so far this seems to work well:

function () {
    ua=window.navigator.userAgent;
    if(r=/edge\/(\d+)/i.exec(ua))return 'EdgeHTML '+r[1];
    if(r=/edga?\/(\d+)/i.exec(ua))return 'Blink '+r[1];
    if(r=/firefox\/(\d+)/i.exec(ua))return 'Gecko '+r[1];
    if(r=/chrome\/(\d+)/i.exec(ua))return 'Blink '+r[1];
    if(r=/webkit\/(\d+)/i.exec(ua))return 'WebKit '+r[1];
    return '(unknown)';
}