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

new_audit: entity-classification #14614

Closed
wants to merge 75 commits into from
Closed

new_audit: entity-classification #14614

wants to merge 75 commits into from

Conversation

alexnj
Copy link
Member

@alexnj alexnj commented Dec 15, 2022

Addressing #14440 and the design doc, this PR introduces an entity-classification audit that classifies all 1st and 3rd party entities (recognized by third-party-web and unrecognized) and exposes them in LHR as an informative audit. By and large, this achieves a few important things:

  1. Switches third-party filtering logic on the reporting side from origin string comparison to proper entity comparison.
  2. Lays down the necessary groundwork for grouping and aggregating reports by entities (which is work in progress and should land into another PR soon). This will also support filtering reports by entities, in future.
  3. Partially addresses Expand third-party classification to include unrecognized entities #14440 (Everything minus "Closing the loop", which requires additional work to reduce the amount of user-generated reports, through automation).
  4. Implements a computed artifact that all audits that handle URLs now depend on, to markup details.items with entity names. This will allow JSON consumers / HTTPArchive users to query and aggregate items by entity names. For example, one could query What % of unused JavaScript is shipped by "Google Ads" entity?, without having to worry about aggregating all URLs used by that entity.

Other notes:

  • In order to maintain backward compatibility with older LHR JSON (that don't contain entity-classification or details.item.entity attribute), third-party filters will continue using origin string match logic as a fallback.
  • Unrecognized entities are classified via Util.getRootDomain. In future, we could explore joining different first-party root domains into a single entity via First-Party Sets and reduce any over-aggregation via Public Suffix List.

alexnj added 30 commits October 20, 2022 15:14
@vercel
Copy link

vercel bot commented Dec 17, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lighthouse 🔄 Building (Inspect) Jan 6, 2023 at 1:06AM (UTC)

core/computed/entity-classification.js Outdated Show resolved Hide resolved
core/computed/entity-classification.js Outdated Show resolved Hide resolved
core/computed/entity-classification.js Outdated Show resolved Hide resolved
core/computed/entity-classification.js Outdated Show resolved Hide resolved
core/audits/entity-classification.js Outdated Show resolved Hide resolved
core/audits/third-party-facades.js Outdated Show resolved Hide resolved
core/audits/uses-rel-preconnect.js Show resolved Hide resolved
core/config/default-config.js Outdated Show resolved Hide resolved
Co-authored-by: Adam Raine <6752989+adamraine@users.noreply.github.com>
alexnj and others added 3 commits January 5, 2023 15:21
@alexnj
Copy link
Member Author

alexnj commented Jan 18, 2023

Closing this in favor of #14622. All the review changes made here should've made it to that branch.

@alexnj alexnj closed this Jan 18, 2023
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.

5 participants