feat: support OpenRTB 2.6 EIDs in user.eids - #1011
Open
mdanylov-sigma wants to merge 2 commits into
Open
mdanylov-sigma wants to merge 2 commits into
mdanylov-sigma wants to merge 2 commits into
Conversation
Addresses the review comments on #954: - Run EID placement on the final request JSON, after OpenRtbMerger, and give each enabled location the same combined list. Prebid Server drops user.ext.eids whenever user.eids is present, so EIDs sent through the global ORTB config were lost. - Remove Eid, Uid, User.eids and ExternalUserId.toEid(); getJson() is the only serializer. - Copy TargetingParams.getUserExt() per request instead of writing eids into the publisher's shared Ext. - Reset the placement to COMPATIBLE in test cleanup and test every placement against getJsonObject() output. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #935. Supersedes #954 by @pkowalski-id5, who offered to hand it over; the first commit is his, cherry-picked onto current master.
iOS counterpart: prebid/prebid-mobile-ios#1350 (same API names and default).
What
ExternalUserIdgets the OpenRTB 2.6 provenance fieldsinserter,matcherandmm, serialized bygetJson().PrebidMobile.setEidsPlacement(EidsPlacement):OPEN_RTB_2_6,OPEN_RTB_2_5orCOMPATIBLE(default).BidRequest.getJsonObject()places the EIDs after the ORTB config merges.Changes on top of #954
OpenRtbMerger.globalMerge. It combinesuser.eidsanduser.ext.eids(entries already inuser.eidsare not repeated) and writes that one list to each location the placement enables. Prebid Server dropsuser.ext.eidswheneveruser.eidsis present (PBS-GomoveEIDFrom25To26, PBS-JavaBidRequestOrtb25To26Converter). With EID OpenRTB 2.6 support #935 #954, EIDs sent asuser.ext.eidsthroughsetGlobalOrtbConfigwere lost as soon as the SDK had an EID of its own.Eid,Uid,User.eidsandExternalUserId.toEid(); both locations carry the objects built byExternalUserId.getJson().BasicParameterBuildercopiesTargetingParams.getUserExt()instead of puttingeidsinto the publisher'sExt, where they stayed after the IDs were cleared.EidsPlacement.inUser()/inUserExt(), which nothing needs now, and keptTextUtilsout ofExternalUserId.Review comments on #954
Extkeeps a staleeidskeyuser.extis a copy per request, and placement works on freshly built JSON. Tests:whenAppendParametersWithExternalUserIds_SharedUserExtIsNotModified,eidsPlacement_changedBetweenRequests_leavesNoStaleEids.OPEN_RTB_2_6BidRequestTestresets toCOMPATIBLE.BasicParameterBuilderTestno longer touches the placement and now also clearsuserExt.COMPATIBLE, as on iOS. All three placements and the no-EID case are tested againstgetJsonObject()output.CollectionUtils.isEmptyon non-null listsgetJson()is the only serializer.Notes for reviewers
COMPATIBLE, the auction on Prebid Server is unchanged (it readsuser.eids, which now holds the full list), and servers that only readuser.ext.eidskeep working. The cost is EIDs appearing twice in the request. Candidate for the next major: default toOPEN_RTB_2_6and deprecate the other two.prebid-mobile/pbm-api/android/pbm-targeting-android.mdneeds the new setting.Test plan
./gradlew :PrebidMobile-core:testDebugUnitTest: 1312 tests, includingBidRequestTest,ExternalUserIdTest,BasicParameterBuilderTest,OpenRtbMergerTestandSharedIdTest. The only failure,MraidInternalBrowserActionTest.handleInternalBrowserActionFollowUrlSuccessAndIsMraid_StartActionViewActivity, fails the same way on master (c2d24603); it compares intent flags againstBuildConfig.DEBUG.🤖 Generated with Claude Code