Analytics: AMP and video events skip activity controls applied to auction events
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Start with src/main/java/org/prebid/server/analytics/reporter/AnalyticsReporterDelegator.java, especially isAllowedAdapter and updateEvent, then inspect the existing auction and AMP handling alongside the VideoEvent and AmpEvent context APIs. Run the reporter delegator tests and add coverage for activity controls, user/device masking, and reporter-specific analytics trimming on AMP and video events. Done means those events follow the same per-reporter controls as auction events.
Written by the indexing model from the issue text.
Description
🤖 This issue was written by an AI agent (Claude Code) on behalf of @patmmccann.
What happens
AnalyticsReporterDelegator applies account activity controls fully only to AuctionEvent. AMP and video events get less:
1. Video events: reportAnalytics is never checked. In isAllowedAdapter, the VideoEvent branch sets activityInfrastructure = null, even though videoEvent.getAuctionContext() has one. isAllowedActivity then falls back to ALLOW_ACTIVITY_BY_DEFAULT (true):
- https://github.com/prebid/prebid-server-java/blob/9ac33456c4d57336fdb2514fa15b792fdfb3d20d/src/main/java/org/prebid/server/analytics/reporter/AnalyticsReporterDelegator.java#L211-L217
- https://github.com/prebid/prebid-server-java/blob/9ac33456c4d57336fdb2514fa15b792fdfb3d20d/src/main/java/org/prebid/server/analytics/reporter/AnalyticsReporterDelegator.java#L315-L322
The auction and AMP branches just above (L179-L203) pass the context's ActivityInfrastructure and a BidRequestActivityInvocationPayload.
2. AMP and video events: no masking and no ext.prebid.analytics trimming. updateEvent handles only AuctionEvent:
For auction events, it masks user/device for each reporter according to transmitUfpd, transmitEids and transmitPreciseGeo (L285-L313), and trims ext.prebid.analytics to that reporter's own entry (L324-L350). AmpEvent and VideoEvent skip both steps, so every reporter gets the unmasked auctionContext.bidRequest along with all reporters' ext.prebid.analytics entries.
Why it matters
Privacy. A publisher who denies reportAnalytics to a reporter could still have that reporter receive video events. A publisher who denies transmitUfpd, transmitEids or transmitPreciseGeo to analytics could still have reporters receive user FPD, EIDs, and precise geo/IP on AMP and video traffic. Each reporter could also see the request-level analytics config meant for other reporters. PBS-Go applies reportAnalytics, transmitUfpd and transmitPreciseGeo to auction, AMP and video events alike, so the two servers behave differently here.
To reproduce
Account config:
{
"privacy": {
"allowactivities": {
"reportAnalytics": { "rules": [{ "condition": { "componentType": ["analytics"], "componentName": ["pubstack"] }, "allow": false }] },
"transmitUfpd": { "default": false }
}
}
}
with pubstack (or any reporter) enabled and listed in analytics.global.adapters.
/openrtb2/videofor this account:pubstackstill receives theVideoEvent./openrtb2/amp(or video) with a stored request that hasuser.eids,user.dataanddevice.geo: every allowed reporter receives them unmasked, while the same request on/openrtb2/auctionis masked.
Expected behaviour
AMP and video events go through the same per-reporter reportAnalytics check, user/device masking and ext.prebid.analytics trimming as auction events.
Suggested fix
- In
isAllowedAdapter, handleVideoEventthe same way asAmpEvent(take theActivityInfrastructureandBidRequestActivityInvocationPayloadfromvideoEvent.getAuctionContext()). - In
updateEvent, applyupdateAuctionContextAdaptertoAmpEventandVideoEventtoo (both havetoBuilder = true).
References
- Found while documenting PBS analytics events: https://github.com/prebid/prebid.github.io/pull/6997
- Related: https://github.com/prebid/prebid-server-java/issues/4716 (the shared
ext.prebid.analyticsnode is changed in place)
🤖 Generated with Claude Code
- Dominant language
- Java
- Stars
- 108
- Forks
- 258
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 12
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prebid/prebid-server-java
-
auto
Difficulty 3/5 1-2 days Newbie friendliness 52/100
prebid/prebid-server-java#4721 ·
Maintainers usually reply within 2 days
-
Port PR from PBS-Go: Beachfront: Fix for Off-by-one comparison against lengthPossibly taken @osulzhenko claimed this 3 days ago. Openauto
Difficulty 2/5 1-3 hours Newbie friendliness 53/100
prebid/prebid-server-java#4720 · 1 assignee ·
Maintainers usually reply within 2 days
-
auto
Difficulty 4/5 3-5 days Newbie friendliness 35/100
prebid/prebid-server-java#4719 ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
prebid/prebid-server-java#4718 ·
Maintainers usually reply within 2 days
-
Analytics: cookie_sync and setuid events ignore analytics.global.adapters and account enabled flagOpen
Difficulty 4/5 3-5 days Newbie friendliness 55/100
prebid/prebid-server-java#4717 ·
Maintainers usually reply within 2 days
All issues in prebid/prebid-server-java
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
hermes-queue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
chrisalunlloyd2-sudo/mindpalace#425 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
documentation enhancement first-time-contributor good first issue
Difficulty 1/5 Under an hour Newbie friendliness 84/100
SasanLabs/VulnerableApp#961 · 1 comment ·
Maintainers usually reply within 1 day