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

UserID Module: allow userid to ppid sync #6448

Closed
wants to merge 16 commits into from
Closed

UserID Module: allow userid to ppid sync #6448

wants to merge 16 commits into from

Conversation

patmmccann
Copy link
Collaborator

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

Solution to #6430

modules/userId/index.js Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Mar 19, 2021

This pull request introduces 1 alert when merging 58e7a30 into 8c218d9 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@patmmccann patmmccann marked this pull request as ready for review March 19, 2021 18:33
@harpere harpere requested a review from jlukas79 March 19, 2021 21:21
@harpere harpere added feature minor needs 2nd review Core module updates require two approvals from the core team needs review labels Mar 19, 2021
modules/userId/index.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@smenzer smenzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

need to add a test for this and a link to docs pr, please

modules/userId/index.js Show resolved Hide resolved
@patmmccann
Copy link
Collaborator Author

@smenzer docs pr is linked above

I am not sure how best to test this, as googletag doesn't have some sort of ppid successfully set functionality i can test for, what do you recommend?

@smenzer
Copy link
Collaborator

smenzer commented Mar 24, 2021

I am not sure how best to test this, as googletag doesn't have some sort of ppid successfully set functionality i can test for, what do you recommend?

Could you maybe try to mock this part and then just check that the ppid that gets passed in to that method ultimately is the right one (and fails to call it if the ID doesn't meet the requirements)?

window.googletag.cmd.push(function() {
    window.googletag.pubads().setPublisherProvidedId(ppid)
});

@ChrisHuie ChrisHuie changed the title Allow userid to ppid sync UserID Module: allow userid to ppid sync Mar 24, 2021
@patmmccann
Copy link
Collaborator Author

I can't seem to restore the branch this was on, I plan to close this and reopen

@ChrisHuie
Copy link
Collaborator

@patmmccann you still closing this pr?

@patmmccann
Copy link
Collaborator Author

@robertrmartinez checking in to see if you were able to take a look at making the unit test

@@ -820,6 +821,16 @@ export function init(config) {
auctionDelay = utils.isNumber(userSync.auctionDelay) ? userSync.auctionDelay : NO_AUCTION_DELAY;
updateSubmodules();
}
// userSync.ppid should be one of the 'source' values in getUserIdsAsEids() eg pubcid.org or id5-sync.com
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, how/where would the publisher define the value for userSync.ppid?
Also, my understanding from this comment is that it will leave the choice to the publisher onto which ID from EIDS they choose to use as PPID: do you confirm?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FlorentDancy

The pub will need to set ppid inside of their userSync setConfig.

Something like so:

      config.setConfig({
        userSync: {
          ppid: 'pubcid.org',
          userIds: [
            .. userIds
          ]
        }
      });

where the pubcid.org matches the userId submodules associated eids source value defined in eids.js

This PR has been closed as another one was open to fix the tests etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clear, thanks @robertrmartinez!

@robertrmartinez
Copy link
Collaborator

Closing as new PR to address #7681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature minor needs review needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants