Prebid.js: setTargetingForGPTAsync is missing adUnitCodes parameter

Created on 6 Dec 2016  路  6Comments  路  Source: prebid/Prebid.js

Type of issue

setTargetingForGPTAsync function is setting key-values for all slots on the page instead of specific adUnitCodes that were passed into the function as parameter

Description

We are currently running prebid v0.15.2 and i believe this issue has been existed since v0.9.1.

We have infinite scrolling and we append ad unit to the page as user scrolls down. We call setTargetingForGPTAsync to set targeting to DFP for the new slot.

But, setTargetingForGPTAsync function is no longer accepting AdUnitCodes parameter and it caused setting targeting for all slots to DFP on ad refreshes.

Prebid API documentation mentioned that setTargeingForGPTAsync can be used as follows: pbjs.setTargetingForGPTAsync([codeArr])

But in the actual implementation in prebid.js, setTargetingForGPTAsync is missing codeArr parameters.
$$PREBID_GLOBAL$$.setTargetingForGPTAsync = function () {}

The actual issues is coming from adUnitCodes parameter missing in getWinningBidTargeting() and getDealTargeting() functions.

Steps to reproduce

e.g.,

make a function call: pbjs.setTargetingForGPTAsync(['div-gpt-ad-13']);

Expected results

Expected to set Targeting key values to DFP only for div-gpt-ad-13

Actual results

image

Most helpful comment

setTargetingForGPTAsync now takes an adUnitCodes parameter with #1158

All 6 comments

Just wanted to follow up on this to see if there's anyone looking into this issue. Thanks.

Yes I'll be looking at this today, thanks for your patience.

Thank you!

I'm having the same issue

This does appear still to be an issue. We accept PRs :)

setTargetingForGPTAsync now takes an adUnitCodes parameter with #1158

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whatisjasongoldstein picture whatisjasongoldstein  路  6Comments

jaiminpanchal27 picture jaiminpanchal27  路  3Comments

tedrand picture tedrand  路  4Comments

amelzer picture amelzer  路  6Comments

matthewlane picture matthewlane  路  8Comments