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

Log custom metrics for webalmanac #132

Merged
merged 17 commits into from
Jun 18, 2024
Merged

Log custom metrics for webalmanac #132

merged 17 commits into from
Jun 18, 2024

Conversation

max-ostapenko
Copy link
Contributor

@max-ostapenko max-ostapenko commented Jun 14, 2024

Now you can see custom metric logged by default from running unit tests with Web Almanac.

Applied formatting to privacy.js to trigger the 'changed custom metric' test.


Test websites:

@max-ostapenko max-ostapenko marked this pull request as ready for review June 16, 2024 19:48
Copy link

Custom metrics for https://almanac.httparchive.org/en/2022/

WPT test run results: http://webpagetest.httparchive.org/results.php?test=240616_Q8_6
Changed custom metrics values:

{
    "_privacy": {
        "privacy_wording_links": [
            {
                "text": "\n          Chapter 13: Privacy\n        "
            },
            {
                "text": "\n          Chapter 13: Privacy\n        "
            }
        ],
        "iab_tcf_v1": {
            "present": false,
            "data": null,
            "compliant_setup": null
        },
        "iab_tcf_v2": {
            "present": false,
            "data": null,
            "compliant_setup": null
        },
        "iab_usp": {
            "present": false,
            "privacy_string": null
        },
        "navigator_doNotTrack": false,
        "navigator_globalPrivacyControl": true,
        "document_permissionsPolicy": false,
        "document_featurePolicy": true,
        "referrerPolicy": {
            "entire_document_policy": null,
            "individual_requests": null,
            "link_relations": null
        },
        "media_devices": {
            "navigator_mediaDevices_enumerateDevices": false,
            "navigator_mediaDevices_getUserMedia": false,
            "navigator_mediaDevices_getDisplayMedia": false
        },
        "geolocation": {
            "navigator_geolocation_getCurrentPosition": false,
            "navigator_geolocation_watchPosition": false
        },
        "fingerprinting": {
            "counts": {
                "getimagedata": 2,
                "prefers-reduced-motion": 4,
                "resolvedoptions().timezone": 2,
                "gettimezoneoffset": 5,
                "devicememory": 5,
                "localstorage": 1
            },
            "likelyFingerprintingScripts": [
                "https://almanac.httparchive.org/static/js/almanac.js?v=096e38f74c72532860651812978526c5",
                "https://almanac.httparchive.org/static/js/send-web-vitals.js?v=b7224f484fe762e075d4838286ddb066"
            ]
        },
        "request_hostnames_with_cname": {
            "almanac.httparchive.org": [
                "ghs.googlehosted.com"
            ]
        },
        "ccpa_link": {
            "hasCCPALink": false,
            "CCPALinkPhrases": []
        }
    }
}
Custom metrics for https://example.com/

WPT test run results: http://webpagetest.httparchive.org/results.php?test=240616_T7_7
Changed custom metrics values:

{
    "_privacy": {
        "privacy_wording_links": [],
        "iab_tcf_v1": {
            "present": false,
            "data": null,
            "compliant_setup": null
        },
        "iab_tcf_v2": {
            "present": false,
            "data": null,
            "compliant_setup": null
        },
        "iab_usp": {
            "present": false,
            "privacy_string": null
        },
        "navigator_doNotTrack": false,
        "navigator_globalPrivacyControl": false,
        "document_permissionsPolicy": false,
        "document_featurePolicy": false,
        "referrerPolicy": {
            "entire_document_policy": null,
            "individual_requests": null,
            "link_relations": null
        },
        "media_devices": {
            "navigator_mediaDevices_enumerateDevices": false,
            "navigator_mediaDevices_getUserMedia": false,
            "navigator_mediaDevices_getDisplayMedia": false
        },
        "geolocation": {
            "navigator_geolocation_getCurrentPosition": false,
            "navigator_geolocation_watchPosition": false
        },
        "fingerprinting": {
            "counts": {},
            "likelyFingerprintingScripts": []
        },
        "request_hostnames_with_cname": {},
        "ccpa_link": {
            "hasCCPALink": false,
            "CCPALinkPhrases": []
        }
    }
}

Copy link
Member

@tunetheweb tunetheweb left a comment

Choose a reason for hiding this comment

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

LGTM.

Will wait until crawl finished before merging though just in case!

@tunetheweb tunetheweb merged commit 75dfecf into main Jun 18, 2024
5 checks passed
@tunetheweb tunetheweb deleted the fun-alpaca branch June 18, 2024 21:09
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