Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect brand and model device for Client-Hints #7430

Merged
merged 4 commits into from
Jul 17, 2023

Conversation

sanchezzzhak
Copy link
Collaborator

@sanchezzzhak sanchezzzhak commented Jun 30, 2023

these statistics are where the device model is known and the brand is not known from the client-hints.

year month sum(device_model_id > 0 and device_brand_id = 0)
2023 4 10056
2023 5 69586
2023 6 104428
2023 7 8652

image

this fix will help to return the brand and the name of the device.

'(Android 10[.\d]*; K)',
\sprintf('Android %s; %s', $osVersion, $deviceModel),
$this->userAgent
));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory it could happen that a device model was provided through the client hints, but the os version is empty. This would in that case end up in a user agent where no version is set at all. Maybe we should keep Android 10 if no version is provided?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have rules based on the version + code of the device. I will add a check for the presence of OS

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgiehl You can watch this PR again? I made changes.

@sanchezzzhak sanchezzzhak merged commit c235832 into matomo-org:master Jul 17, 2023
14 checks passed
@sanchezzzhak sanchezzzhak deleted the pr_device_clickhints branch July 17, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants