benvinegar / counterscale

Scalable web analytics you run yourself on Cloudflare
https://counterscale.dev
MIT License
1.51k stars 66 forks source link

Identify device "K" as Android #88

Open benvinegar opened 4 months ago

benvinegar commented 4 months ago

Looks like this currently in the product:

image

This is actually being parsed properly out of User Agent strings that look like this:

Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<majorVersion>.0.0.0 Mobile Safari/537.36

Notice the substring: (Linux; Android 10; K)

From Google:

Starting in Chrome 110 (February 2023) we are gradually introducing a fixed value for Android version and device model—the default value will always be Android 10 on a model K.

More: