-
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
Zeotap ID+ submodule #5640
Zeotap ID+ submodule #5640
Conversation
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.
a few changes requested based on not seeing the need for storage configuration or configParams mostly
}, | ||
{ | ||
name: "zeotapIdPlus", | ||
storage: { | ||
type: "cookie", | ||
name: "IDP" | ||
} |
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.
it looks like you are defining your own name for the cookie and you're not leveraging the userId module storage (which is what this bit is used for). so I think you can just ignore this, like how Parrable does.
based on your module code, I think you can just do this:
}, | |
{ | |
name: "zeotapIdPlus", | |
storage: { | |
type: "cookie", | |
name: "IDP" | |
} | |
}, | |
{ | |
name: "zeotapIdPlus" |
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.
Hey @smenzer, thanks for the suggestion, have made changes to the module and files to remove storage configuration.
modules/zeotapIdPlusIdSystem.js
Outdated
function isValidConfig(configParams) { | ||
if (!configParams) { | ||
utils.logError('User ID - zeotapId submodule requires configParams'); | ||
return false; | ||
} | ||
if (!configParams.name) { | ||
utils.logError('User ID - zeotapId submodule requires valid config params: name'); | ||
return false; | ||
} | ||
return true; | ||
} |
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 your example you don't list any params, but you are requiring "name" here. what is the name param and how are you using it? i don't see it anywhere in your code
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 removed, not required.
modules/zeotapIdPlusIdSystem.js
Outdated
} | ||
|
||
function fetchId(configParams) { | ||
if (!isValidConfig(configParams)) return undefined; |
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.
per the above, i don't think you need this since you're not using any configParams
if (!isValidConfig(configParams)) return undefined; |
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.
made changes.
test/spec/modules/userId_spec.js
Outdated
name: 'zeotapIdPlus', | ||
storage: { name: 'IDP', type: 'cookie' } |
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.
per above, this can probably be dropped
name: 'zeotapIdPlus', | |
storage: { name: 'IDP', type: 'cookie' } | |
name: 'zeotapIdPlus' |
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.
dropped.
test/spec/modules/userId_spec.js
Outdated
@@ -1314,6 +1357,8 @@ describe('User ID', function() { | |||
name: 'sharedId', storage: {name: 'sharedid', type: 'cookie'} | |||
}, { | |||
name: 'intentIqId', storage: { name: 'intentIqId', type: 'cookie' } | |||
}, { | |||
name: 'zeotapIdPlus', storage: { name: 'IDP', type: 'cookie' } |
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.
per above, this can probably just be your name
name: 'zeotapIdPlus', storage: { name: 'IDP', type: 'cookie' } | |
name: 'zeotapIdPlus' |
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.
made changes.
name: 'zeotapIdPlus', | ||
storage: { name: 'IDP', type: 'cookie' } |
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.
probably can drop storage
name: 'zeotapIdPlus', | |
storage: { name: 'IDP', type: 'cookie' } | |
name: 'zeotapIdPlus' |
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.
dropped.
name: 'zeotapIdPlus', | ||
storage: { | ||
name: 'IDP', | ||
type: 'cookie' | ||
} |
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.
probably can drop storage
name: 'zeotapIdPlus', | |
storage: { | |
name: 'IDP', | |
type: 'cookie' | |
} | |
name: 'zeotapIdPlus' |
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.
dropped.
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.
LGTM
@smenzer anything else required from my side for this to be merged? |
@shikharsharma-zeotap where are you actually generating the ID? if there's no ID in cookie/local storage...right now you just return |
@smenzer the ID will be generated on the publisher page by our JS. No calls to our server is required from prebid's end. |
Are modifications to the eids spec and userid spec required parts of adding a user id module? Most user id commits seem to modify them but not all. You seem to be missing a unit test on eids spec |
there are a couple tests in those two specs that look at basic testing for any modules that want to. eids seems required although the tests in userId_spec can be covered by a separate test suite; but better to have both than nothing if you ask me. |
so if the publisher doesn't have your JS on page from a direct integration with Zeotap, you aren't expecting to be able to provide an ID, right? |
Yes @smenzer, we expect publisher integration with zeotap for ID to be present, so generation/server calls from prebid are not required. Also, thanks @patmmccann , will be adding the Eid spec tests too. |
@idettman can you do a quick review and make sure you're ok with this before we merge? thanks! |
I don't think this can be merged until eids.js is covered with a test |
import {submodule} from '../src/hook.js'; | ||
import { getStorageManager } from '../src/storageManager.js'; | ||
|
||
const ZEOTAP_COOKIE_NAME = 'IDP'; |
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.
should this be configurable by the pub? can you read if this is set in config and fallback to 'IDP' ?
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.
@patmmccann I have added the tests to eid spec file. The cookie name 'IDP' is not configurable by the pub. It gets added to the storage by Zeotap JS after publisher integration. I didn't get the other question.
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.
Thanks!
5e0b415
to
36dcf11
Compare
@idettman waiting for your comments. @smenzer @patmmccann have resolved conflicts with base branch. Can we merge this now? |
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.
thanks for the additional test for eids.
CI is failing, though, so that needs to be fixed before we can merge. @idettman can you do a quick review, too, please?
@smenzer the circleCI shows 2 tests breaking during the BrowserStack testing. |
@shikharsharma-zeotap i'm not really sure why the builds are failing...locally they run fine for me. i've reached out to the prebid community in slack and perhaps someone else here can take a look at things. once that is fixed this is good to go from my end |
@shikharsharma-zeotap can you try pulling in the latest master to see if that helps at all? |
36dcf11
to
3b56ee6
Compare
Hey @smenzer , have rebased with the latest master, looks like the circleCI has stopped complaining for us now. Thanks! |
Type of change
Description of change
This pr adds the zeotapIdPlusIdSystem submodule to add Zeotap IDP id to the bid requests.
Documentation PR Link: prebid/prebid.github.io#2260