device-detector
device-detector copied to clipboard
Client Hints - name of the Model
Hello,
First of all - Thank You very much for implementing the client hints! I'm currently testing the released version.
--
Given this User Agent:
Mozilla/5.0 (Linux; Android 10; LM-V405) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.79 Mobile Safari/537.36
It reports the device as being:
- Chrome Mobile 100.0.4896.79
- Android 10 (Mobile)
- LG V40 ThinQ
I'm trying to experiment how would Matomo detect if I use a reduced device, as indicated in: https://www.chromium.org/updates/ua-reduction/
Sample UA Strings: Final Reduced State Final Reduced UA: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.0.0 Mobile Safari/537.36
So I'm sending:
User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Mobile Safari/537.36 HTTP_SEC_CH_UA_PLATFORM: "Android" HTTP_SEC_CH_UA_PLATFORM_VERSION: "10.0.0" HTTP_SEC_CH_UA_MOBILE: ?1 HTTP_SEC_CH_UA: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100" HTTP_SEC_CH_UA_MODEL: "LM-V405"
However, Matomo is no longer detecting as "LG V40 ThinQ", and simply returns the model as is: "LM-V405".
Same for "Moto G (4)", which used to be detected as "Motorola Moto G4".
Is this a limitation, or the expected, or something planned for the future?
Thank you very much!
@ghnp5 See https://github.com/matomo-org/device-detector/pull/6989#issuecomment-1056749664
This behavior has been fixed in 17.07.2023. Example test fixture
-
user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36
headers:
Sec-CH-UA: '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
Sec-CH-UA-Full-Version: "111.0.5563.116"
Sec-CH-UA-Platform-Version: ""
Sec-CH-UA-Model: "22071219CG"
Sec-CH-Prefers-Color-Scheme: "light"
os:
name: Android
version: "10"
platform:
client:
type: browser
name: Chrome Mobile
version: 111.0.5563.116
engine: Blink
engine_version: 111.0.0.0
device:
type: smartphone
brand: POCO
model: M5
os_family: Android
browser_family: Chrome
More examples can be found in the file https://github.com/matomo-org/device-detector/blob/master/Tests/fixtures/clienthints.yml