PrebidMobile.setExternalUserIds is not adding external users
Describe the bug
PrebidMobile.setExternalUserIds(...) does not set the userIds in the Prebid bid request user section. However if using TargetingParams.storeExternalUserId then I see the userId in the bid request.
To Reproduce Steps to reproduce the behavior:
- Git clone Prebid Android SDK Project
- Go to PrebidDemoKotlin -> CustomApplication.kt
- Add in onCreate() this code:
PrebidMobile.setExternalUserIds(mutableListOf(ExternalUserId("PrebidMobile", "prebidMobile-123", null, null))) - Run app with App inspection
- See under the network inspector -> "/auctions" endpoint, I do not see the user added.
Expected behavior
All the users set with PrebidMobile.setExternalUserIds should be added to the Prebid bid request user section.
Screenshots
With PrebidMobile.setExternalUserIds, bid request user is empty
With TargetingParams.storeExternalUserId, user has the externalUserId
Desktop (please complete the following information): MacBook Pro Apple M3 Pro
Smartphone (please complete the following information):
- Device: Google Pixel 4
- OS: Android 11
Additional context None
Same here on android with prebid version 2.2.3 This happens also with prebid 2.1.1
@OlenaPostindustria, please check the behaviour on iOS.
Hi, on iOS both methods for setting external users - using Targeting or Prebid - work properly. However, when both methods are applied, the data set through Targeting takes priority over the data set via Prebid.
Ref: https://github.com/prebid/prebid-mobile-ios/blob/46e330f6a683f2086914a861af4b9fbfefd8e33d/PrebidMobile/ConfigurationAndTargeting/Targeting.swift#L239
Hi @sarbyn! I'd like to propose the following fix:
- Deprecate
PrebidMobile.setExternalUserIds - Introduce
TargetingParams.setExternalUserIdsthat will accept the array of IDs.
The motivation for this is as follows:
- The class
PrebidMobileshould be used to tune the SDK behavior, such as request timeout. - The class
TargetingParamsshould be used to modify the bid request.
Hello.
We compared implementation with OpenRTB standard. During testing, we found some problems and limitations of ExternalUserId.
- The SDK sends
adtypeinstead ofatype.
{
"source": "sharedid.org",
"uids": [
{
"adtype": 1,
"ext": {
"third": "01ERJWE5FS4RAZKG6SKQ3ZYSKV"
},
"id": "111111111111"
}
]
}
- It's impossible to set many
uidsobjects for one source in the code. But according to the documentation it is acceptable.
"uids": [
{
"id": "yyy",
"atype": 1
},
{
"id": "zzz",
"atype": 1
},
{
"id": "DB700403-9A24-4A4B-A8D5-8A0B4BE777D2",
"atype": 2
}
]
- Currently the SDK stores Extended Identifiers in the permanent storage, so they will be restored after restarting the app. Do we need to store them like this?
Note: On the committee call, it was decided that SDK shouldn't store these values in application storage.