prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.28k stars 2.05k forks source link

GPT Pre-Auction Module does not work with Instream #9843

Closed harrykingriches closed 1 year ago

harrykingriches commented 1 year ago

Type of issue

BUG

Description

The GPT Pre-Auction Module does not pick up Instream AdUnits. This is because they are not created using the googletag.defineSlot() function. When the module runs, it checks for any GPT slots, which there are none specifically for instream.

Steps to reproduce

Create a test page for instream with the GPT Pre-Auction module enabled. Define the video ad unit for Prebid to consume and send ad requests. Add the gptPreAuction object inside pbjs.setConfig() Capture the bid request object:

        pbjs.onEvent("bidRequested", (bidderRequest) => {
         console.log(bidderRequest.bids[0].ortb2Imp);
        });

Run the page and invoke the call to the Ad Server. Check the console logs for the ort2Imp object.

Test page

Link to page with defineSlot function: https://magnite-hking-riches.s3.eu-west-1.amazonaws.com/instream-gpid/index_with_defineSlot.html Link to page without defineSlot function: https://magnite-hking-riches.s3.eu-west-1.amazonaws.com/instream-gpid/index_without_defineSlot.html

This is not a complete integration as it is not needed to demonstrate the issue. The results of the bid request is written to the document body.

Expected results

gpid values should populate for instream

Actual results

gpid values only populate for instream when googleTag.defineSlot is present for the ad unit.

Platform details

/ prebid.js v7.9.0 Updated: 2023-04-20 Modules: rubiconBidAdapter, gptPreAuction, fpdModule, adpod, appnexusBidAdapter, rubiconBidAdapter, consentManagement, consentManagementUsp, enrichmentFpdModule, gdprEnforcement, gptPreAuction, dfpAdServerVideo /

spormeon commented 1 year ago

i got around it by setting on the adunit, with similar to:

ortb2Imp: { ext: { gpid: adysisSlot, data: { pbadslot: adysisSlot, adserver: { name: "gam", adslot: adysisSlot } } } },

dgirardi commented 1 year ago

Forgive the dumb question, does GPT "know" about instream? (@karimMourra ?) I don't think it does (in general - maybe for some players), and if that's the case this cannot be fixed.

patmmccann commented 1 year ago

The GPT pre-auction module is unaware of slots not known to GPT, such as instream slot. https://docs.prebid.org/dev-docs/modules/gpt-pre-auction.html

You can specify via example 1 here or @spormeon 's example above https://docs.prebid.org/features/pbAdSlot.html#further-reading

We do not have an IAMSDK pre-auction module, but we'd welcome the contribution.

patmmccann commented 1 year ago

It might make sense to have iu get picked up from FPD gpid that is set -- https://docs.prebid.org/dev-docs/publisher-api-reference/adServers.dfp.buildVideoUrl.html? If you'd like that please open that feature request

muuki88 commented 1 year ago

Thanks @Strife9224 , we updated the docs here: https://docs.prebid.org/features/pbAdSlot.html