-
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
update parameter field from consentManagement iframe call #5505
Conversation
The
I was going to open a GH issue that for v2 the iframe The easy fix for just the issue in this PR would be to replace |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.
Looks good
Hi @jbartek25 I'm sorry for the delayed response here. I went through your comments/points and I had a few thoughts and questions in return. In the iframe scenario described, I don't think that would actually be an issue. From what you described, it should happen when you're doing a subsequent call to the CMP after the go-around within this unique iframe environment. However, Prebid stores the consent data after the first request in memory and uses that value again on the follow-up auction requests within the same page session. If the user happened to update their consent information in that same session - the event listener we registered to the CMP would still be active and we'd receive the updated event trigger and store that new version of the consent data. When the user goes to a new page (ending that original page session), everything gets reset and we have to find the true CMP fresh again. Further, even we didn't store the consent data and let the module try to find the 'CMP' again, it appears to still work out (at least from my testing). When Prebid first goes through the logic to create a local CMP function due to a 3rd party iframe, it creates that iframe at the same level where Prebid sits. In your example, that would be the 2nd inner iframe (at least that's what I got from the description). So when we call the findCMP during the 2nd round, it would immediately find the local CMP function at the same frame as Prebid. The module would then use the local function path (not the iframe route) to make the CMP call. This local CMP function would then generate the postMessage request (with the needed data since we assign the version param independently and not using the function params). Because we're still in the same page session and the So given the factors above and the fact that we still don't actively populate the We could opt to go with the |
Hi @jsnellbaker To clarify: iframe1 and iframe2 in my example are running separate Prebid.js instances. That should mean that each Prebid instance performs its own CMP lookup. iframe1 Prebid will create a local CMP function which iframe2 Prebid will find and call (since iframe1 and iframe2 are friendly) but the TCFv2 call will fail because iframe1 currently defines a local |
I have:
|
want to review some of the comments again.
modules/consentManagement.js
Outdated
@@ -220,7 +219,7 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) { | |||
window.addEventListener('message', readPostMessageResponse, false); | |||
|
|||
// call CMP | |||
window[apiName](commandName, null, moduleCallback); | |||
window[apiName](commandName, moduleCallback); |
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.
@Josh-G do I understand correctly that changing null
to undefined
fixes this for Quantcast?
window[apiName](commandName, undefined, moduleCallback);
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 so, sounds like this is the change we should make to preserve the function signature.
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.
llooks like an official quantcast response below , thanks guys!
There is a discussion within the IAB Typescript slack forum. The IAB spec requires that arguments to be either valid or undefined. But not null. I think the core TCF library is going to be fixed. That said changing this to window[apiName](commandName, undefined, moduleCallback); will fix the issue. |
To all involved, I have updated the changes to just use the Please take a look when you get the chance. |
* remove parameter field from consentManagement iframe call * update to undefined approach
…ebid#5505)" This reverts commit e4f3508.
Type of change
Description of change
Fixes #5292
The
parameter
field in the iframe call used by the consentManagement module was causing some issues to the Quantcast CMP (specifically when it was set tonull
). From reviewing our use of the field, we don't actually use the field in any v1 or v2 CMP calls (as we were just hard-coding the value tonull
in all use-cases anyway).From the community's testing, removing the field entirely addresses the issue with the Quantcast CMP. From my testing, removing the field didn't show any issues for other CMPs - so this removal should be safe to implement.