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

PrebidMobile.setExternalUserIds is not adding external users #802

Open
kwchan22 opened this issue Oct 3, 2024 · 5 comments
Open

PrebidMobile.setExternalUserIds is not adding external users #802

kwchan22 opened this issue Oct 3, 2024 · 5 comments
Assignees

Comments

@kwchan22
Copy link

kwchan22 commented Oct 3, 2024

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:

  1. Git clone Prebid Android SDK Project
  2. Go to PrebidDemoKotlin -> CustomApplication.kt
  3. Add in onCreate() this code: PrebidMobile.setExternalUserIds(mutableListOf(ExternalUserId("PrebidMobile", "prebidMobile-123", null, null)))
  4. Run app with App inspection
  5. 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

Screenshot 2024-10-03 at 2 31 12 PM

With TargetingParams.storeExternalUserId, user has the externalUserId

Screenshot 2024-10-03 at 2 32 24 PM

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

@sarbyn
Copy link

sarbyn commented Jan 3, 2025

Same here on android with prebid version 2.2.3
This happens also with prebid 2.1.1

@YuriyVelichkoPI
Copy link
Contributor

@OlenaPostindustria, please check the behaviour on iOS.

@OlenaPostindustria
Copy link
Collaborator

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

@YuriyVelichkoPI
Copy link
Contributor

YuriyVelichkoPI commented Jan 6, 2025

Hi @sarbyn! I'd like to propose the following fix:

  1. Deprecate PrebidMobile.setExternalUserIds
  2. Introduce TargetingParams.setExternalUserIds that will accept the array of IDs.

The motivation for this is as follows:

  • The class PrebidMobile should be used to tune the SDK behavior, such as request timeout.
  • The class TargetingParams should be used to modify the bid request.

@ValentinPostindustria
Copy link
Collaborator

Hello.
We compared implementation with OpenRTB standard. During testing, we found some problems and limitations of ExternalUserId.

  1. The SDK sends adtype instead of atype.
                {
                    "source": "sharedid.org",
                    "uids": [
                        {
                            "adtype": 1,
                            "ext": {
                                "third": "01ERJWE5FS4RAZKG6SKQ3ZYSKV"
                            },
                            "id": "111111111111"
                        }
                    ]
                }
  1. It's impossible to set many uids objects 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
            }
          ]
  1. 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

5 participants