Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

How to integrate GDPR ConsentManagement Module

Open soman opened this issue 8 years ago • 4 comments

Type of issue

question

Description

I have build prebid.js with consentManagement module but i am not clear about below lines:

pbjs.setConfig({ consentManagement: { cmpApi: 'iab', timeout: 8000, allowAuctionWithoutConsent: false } });

When i should use cmpApi: 'iab' and cpmAPi: 'static'?

Test page

http://stage.thisoldhouse.com/header_bidder/test_prebid_undertone.html

Expected results

Need help to integrate GDPR ConsentManagement Module.

soman avatar Oct 15 '18 11:10 soman

@soman To use the GDPR consentManagement module, you'll need to a CMP setup separately on the page along side your Prebid code.

The CMP (Consent Management Platform) collects the user's consent information (if it's needed), and stores the information. When Prebid and the consentManagement load, it'll make a request to the CMP's API and attempt to collect the consent information. Once collected, the module will automatically disseminate to the bidders to forward the information along to their systems.

The module's config settings relate to how the module should perform (ie with the timeout and allowAuctionWithoutConsent fields) and what type of CMP request it should make (ie cmpApi - which the iab value tells the module to make the IAB compliant CMP API request).

If you already have the consent information previously stored or somehow available, then you can use the static value for the cmpApi field to directly pass the information to Prebid. You'll have to format the consent data to the style that's expected, but it'll save the cost/effort of the additional request that's normally made to the CMP to collect the information.

Additional information on that setup can be found here: http://prebid.org/dev-docs/modules/consentManagement.html#page-integration

Please let me know if you have any questions about the above.

jsnellbaker avatar Oct 16 '18 14:10 jsnellbaker

@jsnellbaker This is test page - https://stage.thisoldhouse.com/header_bidder/test_prebid_gdpr_with_test_placementid.html How i will confirm the GDPR consentManagement module integration is perfect? Would you plz help me to debug module integration?

How to see bidderRequest object?

Thanks

soman avatar Oct 24 '18 13:10 soman

If you append ?pbjs_debug=true in the page URL's query section and open the console tab in the browser's developer tools, you should see the log messages from prebid as it loads on the page. Part of these messages will include a message that looks like: INFO: Bids Requested for Auction with id: 63e89319-f203-4ac7-9873-4c386c1d67c5 : params

There's an expandable object in that log line that contains the bidRequest array object for your prebid auction. Note - this is the same as the bidderRequest object that's passed to each adapter (the name just changes later on). If you dig into that object in the console, you'll see something like the following:

screen shot 2018-11-01 at 8 50 47 am

If you notice there's a property named gdprConsent. This property object contains all the information that was requested by the consentManagement module from the CMP you implemented on the page. In my case, I didn't see any prompts load from the CMP to ask my consent - so the gdprConsent object has no data. If it was prompting information - these fields should be populated accordingly.

jsnellbaker avatar Nov 01 '18 12:11 jsnellbaker

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.

stale[bot] avatar Nov 15 '18 13:11 stale[bot]