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

Drop invalid client hints #1264

Closed
adatzer opened this issue Nov 10, 2023 · 0 comments
Closed

Drop invalid client hints #1264

adatzer opened this issue Nov 10, 2023 · 0 comments

Comments

@adatzer
Copy link
Contributor

adatzer commented Nov 10, 2023

The client hints schema used follows exactly the User-Agent Client Hints interface specification.

The JS tracker, in order to attach the client hints entity, currently checks whether userAgentData is there, i.e. whether the API is implemented. However this means that user-agents who have implemented the API, but have not done so according to the spec, create invalid events, which however represent valid user behaviour.

Expected behavior

The JS tracker checks, at least briefly, the compliance of the implemented client-hints API before attaching the context entity to the event. If it finds that the user-agent is not compliant, it does not attach the client-hints context, i.e. an inaccurate implementation of the user-agent client hints interface has the same outcome as no implementation of it.

Example of invalid user-agent client hints:

{
    "brands": [
        {
            "brand": "Opera GX",
            "version": 98
        }
    ]
}
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

No branches or pull requests

1 participant