-
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
Permutive RTD module: support IAB Audience taxonomy #8242
Conversation
Updates the Permutive RTD module to facilitate for segmentation by the new IAB Audience taxonomy. To achieve this, this change introduces the concept of "transformations" on the ORT2B `user.data` object. There are two components to these transformations: a new `transformations` property on the Prebid config, to be set by the publisher, and logic in the module for the actual behaviour of the transformation. We plan to use the transformation logic in this PR, combined with configuration we'll share with publishers, to send IAB Audience taxonomy cohort IDs to bidders.
This pull request introduces 1 alert when merging 000411a into 82987c6 - view on LGTM.com new alerts:
|
This feels like a super clunky experience for publishers. Why doesn't your endpoint return the transformation mappings instead of asking publishers to define potentially enormous config? Also, it would be super trivial to take segtax as an input instead of hard coding it to '4' |
modules/permutiveRtdProvider.js
Outdated
const ortb2UserDataTransformations = { | ||
iabAudienceTaxonomy11: (userData, config) => ({ | ||
name: userData.name, | ||
ext: { segtax: '4' }, |
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.
If you're making pubs define all the transformations, no reason you can't let this be a param...
}, | ||
{ | ||
name: 'permutive.com', | ||
ext: { segtax: '4' }, |
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's an integer
segment: expectedTargetingData | ||
}, | ||
{ | ||
name: 'permutive.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.
Is it really permutive that decided the audience member belongs in that iab segment if permutive fails to provide the transformations? The publisher could easily transform any permutive segment to any iab segment; so I'm not sure this remains correct.
modules/permutiveRtdProvider.js
Outdated
const segment = segmentData.ac.map(seg => { | ||
return { id: seg } | ||
}) | ||
function mergeOrtbConfig (currConfig, segmentIDs, transformationConfigs) { |
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.
There's a utils function for this now, i think it's called mergeDeep
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 suggestion – after looking at this function I realised it's not really doing a simple merge of two objects but actually updating the user.data
array with some new entries. So I don't think mergeDeep
is suitable here, but I've renamed the function to clarify what it does.
@patmmccann thanks for the review so far. In terms of the overhead for publishers: I should have mentioned that this change is to support a test with a single publisher that will only involve a small selection of cohorts. For this test, Permutive will provide the publisher with the segment mapping for use in their config, and we already have agreement from the publisher on this way of working for the test. Our plan was to go with this approach for the test and then revisit our implementation so that the segment mappings come from our SDK rather than the Prebid module in the long term. Ultimately I'd expect that publishers would only need to include a simple flag in their config. Would you accept these changes to the config in light of this extra context? I'll address your other outstanding points of course. |
If you make segtax default to 4 but be overridable in config; i'd be happy to merge. Publishers want code that is "future-proof"; they don't want to have to suddenly upgrade prebid to support segtax i, j or k in their permutive adapter. We much prefer when adapters keep this in mind. If you look at the iab content taxonomy, it has quickly iterated from 2.1 -> 2.2 -> 3.0, each with a different segtax. I would not be surprised if audience gets a new segtax number shortly. |
964f71b
to
2a90d5b
Compare
@patmmccann thanks! I've addressed your comments now, most importantly to include edit to mention that I'll be away for the next couple of weeks and my colleagues @bartholomews and @Mullefa will commit to this branch if there are any more changes to make. |
name: 'www.dataprovider1.com', | ||
ext: { taxonomyname: 'iab_audience_taxonomy' }, | ||
segment: [{ id: '687' }, { id: '123' }] | ||
}, |
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.
two things left: circleci needs to run; add a segtax here. Can be the permutive contextual segtax or the iab contextual (don't use the audience bc that is user.data)
Thanks so much! Did you notice circleci didnt run? Usually helps to unfollow your fork in circleci before you make the change. Just one tiny change in the example file requested. |
@patmmccann thanks again. I've added |
Hi @patmmccann circleci is now green, please let me know if there's anything else left to address! Thanks |
Type of change
Description of change
Updates the Permutive RTD module to facilitate for segmentation by
the new IAB Audience taxonomy.
To achieve this, this change introduces the concept of "transformations"
on the ORT2B
user.data
object. There are two components to thesetransformations: a new
transformations
property on the Prebid config,to be set by the publisher, and logic in the module for the actual
behaviour of the transformation.
We plan to use the transformation logic in this PR, combined with
configuration we'll share with publishers, to send IAB Audience
taxonomy cohort IDs to bidders.