-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
PAIR: Support for Generic TechLab Version #12146
base: master
Are you sure you want to change the base?
PAIR: Support for Generic TechLab Version #12146
Conversation
your general approach is breaking and unlikely to be merged. I would recommend chatting before continuing |
return {'id': ids}; | ||
}, | ||
eids: { | ||
'pairId': { | ||
source: 'google.com', | ||
source: 'iabtechlab.com', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In future IAB may support another Alt ID, so the source for PAIR should clearly mention what it is.
Can we mention it as "pair-iab-tl.com"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't that what atype is for? like a single source can have multiple id types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the existing atype
definitions https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list_agenttypes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
atype identifies the user agent types a user identifier is from.
IABTechLab may have another ID with same atype in future hence we should have clear identification in source that tells its a PAIR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@therevoltingx mentioned we will have a unique atype to identify eid as a PAIR
* used to specify vendor id | ||
* @type {number} | ||
*/ | ||
gvlid: 755, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this configurable. Should be the DSP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not included in the bid request at all. this is the owner of the module. we need prebid to confirm.
the prefered thing to do is to leave as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use VENDORLESS_GVLID
here
return {'id': ids}; | ||
}, | ||
eids: { | ||
'pairId': { | ||
source: 'google.com', | ||
source: 'iabtechlab.com', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this? I assumed it was the ID type which is now a techlab id type
modules/pairIdSystem.js
Outdated
return {'id': ids}; | ||
}, | ||
eids: { | ||
'pairId': { | ||
source: 'google.com', | ||
source: 'iabtechlab.com', | ||
atype: 571187 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirm that this value was assigned to pair protocol
Identity PMC recommend that the IAB TL close this PR and open a new PR for their cleanroom implementation. |
Sorry for the late update :-) The code in the original pairIdSystem and the new module (which will have a PR created) will have a lot of duplication. We talked about needing to change some parameter values, like switching the source from “google.com” to “iabtechlab.com” and updating or removing the GVL. To avoid duplicating code, we can add a new optional “mode” parameter to the module. This parameter will adjust these values based on its setting. If the “mode” parameter isn’t specified, the module will work the same as before with the original values (backward compatible). However, if the “mode” is set to “open,” the module will slightly change its behavior, like altering the source parameter to "iabtechlab.com" and the GVL reference. |
I really like the idea. But for the eids method, how can I access the configuration? Gonna dig in but if you could point me to how I can access the config there that would be very helpful |
@therevoltingx the |
@pm-harshad-mane I'm referring to line 103 in pairIdSystem.js. You can see the line here: https://github.com/prebid/Prebid.js/blob/master/modules/pairIdSystem.js#L103 The eids module attribute is called by modules/userId/eids.js: https://github.com/prebid/Prebid.js/blob/master/modules/userId/eids.js#L67 Which helps construct the final bid request object. That does not seem to have access to |
@dgirardi can you help us? we are trying to avoid code duplication |
hey @therevoltingx @pm-harshad-mane, was taking a look into the code around the prebid pair module a bit from my end. what about something like this? pbjs.setConfig:
and then the following modifications to the pairIdSystem.js file (which could be further modified as needed):
|
@dgirardi wondering what your thoughts on the suggestion above might be? seems to work fine locally, but curious if there are any other elements i am not considering.. |
@jlquaccia |
For the open version, I think it would be better to use a correct |
Looks like the progress to have a sub-module to support open version of PAIR has derailed since my suggestion for avoiding the code duplication... |
@pm-harshad-mane @bmilekic @jlquaccia After some internal discussion we've gone aheand and decided not to make it backward compatible. We also chose to remove the gvlid as that didn't make much sense to have. Please review and let me know your thoughts. |
for (let i = 0; i < cleanRooms.length; i++) { | ||
const cleanRoom = cleanRooms[i]; | ||
const cleanRoomParams = configParams[cleanRoom]; | ||
|
||
const cleanRoomStorageLocation = cleanRoomParams.storageKey || DEFAULT_STORAGE_PAID_ID_KEYS[cleanRoom]; | ||
const cleanRoomValue = pairIdFromLocalStorage(cleanRoomStorageLocation) || pairIdFromCookie(cleanRoomStorageLocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (let i = 0; i < cleanRooms.length; i++) { | |
const cleanRoom = cleanRooms[i]; | |
const cleanRoomParams = configParams[cleanRoom]; | |
const cleanRoomStorageLocation = cleanRoomParams.storageKey || DEFAULT_STORAGE_PAID_ID_KEYS[cleanRoom]; | |
const cleanRoomValue = pairIdFromLocalStorage(cleanRoomStorageLocation) || pairIdFromCookie(cleanRoomStorageLocation); | |
Object.entries(configParams).forEach( ([cleanRoom, cleanRoomParams]) => { | |
const cleanRoomStorageLocation = cleanRoomParams.storageKey || DEFAULT_STORAGE_PAID_ID_KEYS[cleanRoom]; | |
const cleanRoomValue = pairIdFromLocalStorage(cleanRoomStorageLocation) || pairIdFromCookie(cleanRoomStorageLocation); |
JS made this a little more convienent 😄
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
Suggestion won't fully work as there's probably a closing brace missing
Clean Room Configuration
Bid Request
References