cookiebanner: broaden resource detection via PerformanceObserver
ThirdPartyDetector previously only saw <script src> and <iframe src>
because it scanned the DOM and watched mutations. Add a single
PerformanceObserver({type:'resource', buffered:true}) that picks up
everything the browser actually loaded:
- tracking pixels (<img>, <picture>, srcset)
- cross-origin stylesheets and web fonts
- fetch / XHR / sendBeacon / ping calls (SDK call-homes)
- video, audio, embed, object media
initiatorType is mapped to six new tracker_resource_type enum values
(IMAGE, STYLESHEET, FONT, BEACON, FETCH, MEDIA) and the existing
upsert path in tracker_resources picks them up unchanged.
Closes a real gap with headless cookie scanners: most SDKs phone home
via beacons after their script is gone, and the DOM scan never saw it.
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -308,6 +308,30 @@ enum TrackerResourceType
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.TrackerResourceTypeIframe"
|
||||
)
|
||||
IMAGE
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.TrackerResourceTypeImage"
|
||||
)
|
||||
STYLESHEET
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.TrackerResourceTypeStylesheet"
|
||||
)
|
||||
FONT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.TrackerResourceTypeFont"
|
||||
)
|
||||
BEACON
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.TrackerResourceTypeBeacon"
|
||||
)
|
||||
FETCH
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.TrackerResourceTypeFetch"
|
||||
)
|
||||
MEDIA
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.TrackerResourceTypeMedia"
|
||||
)
|
||||
}
|
||||
|
||||
enum TrackerResourceOrderField
|
||||
|
||||
Reference in New Issue
Block a user