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

Adjustments for client hints support #44

Merged
merged 4 commits into from Jul 4, 2022
Merged

Adjustments for client hints support #44

merged 4 commits into from Jul 4, 2022

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jun 13, 2022

Description:

With matomo-org/matomo#18843 support for client hints will be introduced in Matomo.

As this plugin currently only caches based on the useragent, the additional client hint details would currently be lost.
On the other side it won't make sense to create cache entries based on the useragent and the client hints, as client hints won't be included in any log files.

So I've decided the extend the parser classes used for parsing browser and operating system. The cache entries are still stored based on the useragent. But if client hints are provided, the extended parsers will be used to enrich the results with the client hints.

As parsing the client hints is quite fast and still rarely sent at all, I don't think it's needed to included that in the caching.

Note: The changes in this PR should also work with Matomo versions nor using DeviceDetector with client hints. It therefor shouldn't be needed to increase the minimum required version.

Review

@sgiehl sgiehl marked this pull request as ready for review June 21, 2022 09:26
Copy link

@bx80 bx80 left a comment

Choose a reason for hiding this comment

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

It looks like there is a system test that needs updating, other than that I've looked through the code and done some basic breakpoint testing, can't see any issues.

@sgiehl
Copy link
Member Author

sgiehl commented Jun 30, 2022

The system test should run again, once the changes on core were merged.

@sgiehl
Copy link
Member Author

sgiehl commented Jul 4, 2022

@AltamashShaikh I'll merge this PR now, as we need it to have running tests in core.
Could you release a new version of this plugin the coming days? The changes in the PR are backwards compatible, so there shouldn't be any change needed in the required Matomo version.

@sgiehl sgiehl merged commit e7ddda8 into 4.x-dev Jul 4, 2022
@sgiehl sgiehl deleted the clienthints branch July 4, 2022 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants