ihucos / counter.dev

Web Analytics made simple
https://counter.dev
GNU Affero General Public License v3.0
902 stars 39 forks source link

Identifies Microsoft Edge (Chromium) as IE #58

Closed hello-smile6 closed 1 year ago

hello-smile6 commented 2 years ago

image

CamilleScholtz commented 2 years ago

Related issue: https://github.com/avct/uasurfer/pull/69

Related to this is that android gets seen as Linux (I guess it technically is, but for analytics it would be better to separate the two I think).

Might be time to switch to a different user agent parser? This fork is being updated: https://github.com/xavivars/uasurfer, https://github.com/mileusna/useragent also seems quite nice.

CamilleScholtz commented 2 years ago

It seems MacOS is also not detected. https://github.com/ihucos/counter.dev/issues/56 is most likely related as well.

hello-smile6 commented 2 years ago

It seems MacOS is also not detected. #56 is most likely related as well.

My library can detect MacOS... https://tildegit.org/9pfs/neofetch-js

ihucos commented 1 year ago

Sounds reasonable. Will close until it resurfaces though.

stevennyman commented 1 year ago

I still see Microsoft Edge being detected as IE.

ihucos commented 1 year ago

Will fix :-)

ihucos commented 1 year ago

I changed the lib to the more maintained fork (https://github.com/ihucos/counter.dev/commit/bc58e34a19337824845ab5c11e61b7c82a76f4c5 ): https://github.com/xavivars/uasurfer

Edge is being recognized as Edge now. Android is still shown as linux though :-/

ihucos commented 1 year ago

Identified lasting issue, fixing :-)

ihucos commented 1 year ago

Identified lasting issue, fixing :-)

Regarding "Android" being showed as "Linux":

That pie chart is being called "Platforms", which by uasurfers defintion is:

const (
    PlatformUnknown Platform = iota
    PlatformWindows
    PlatformMac
    PlatformLinux
    PlatformiPad
    PlatformiPhone
    PlatformiPod
    PlatformBlackberry
    PlatformWindowsPhone
    PlatformPlaystation
    PlatformXbox
    PlatformNintendo
    PlatformBot
)

Note, how there is not "Android". Then there is also "OS", which is currently not being tracked. It's one of.

const (
    OSUnknown OSName = iota
    OSWindowsPhone
    OSWindows
    OSMacOSX
    OSiOS
    OSAndroid
    OSBlackberry
    OSChromeOS
    OSKindle
    OSWebOS
    OSLinux
    OSPlaystation
    OSXbox
    OSNintendo
    OSBot
)

There's "iOS" and "iPad" there which seems handy.

There are basically two ways to fix that.

  1. Start tracking uasurfers OSes. Show a pie chart named "OS" rather then "Platform" only when this new data is available (Will never for older intregrations when vieweing all data in the dashboard)

  2. Hack the "Android" into it. Making historic data slight inacurate as, as "Linux" will represent older "Android" counts.

Maybe there are also other solutions?

ihucos commented 1 year ago

I went with solution 1.

Screenshot 2022-09-17 at 16 33 01

Thanks for the feedback. I'll close the issue. Let me know if it works as expected.

stevennyman commented 1 year ago

Edge is now tracked correctly, thank you for fixing this so quickly!

ihucos commented 1 year ago

+1