HTTPArchive / custom-metrics

Custom metrics to use with WebPageTest agents
Apache License 2.0
19 stars 22 forks source link

Log custom metrics for webalmanac #132

Closed max-ostapenko closed 2 months ago

max-ostapenko commented 3 months ago

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:

github-actions[bot] commented 2 months ago
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: ```json { "_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: ```json { "_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": [] } } } ```