Skip to content
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

Setting sendStandardTargetting to false does not suppress deal targets #827

Closed
indexexchange opened this issue Nov 25, 2016 · 8 comments · Fixed by #935
Closed

Setting sendStandardTargetting to false does not suppress deal targets #827

indexexchange opened this issue Nov 25, 2016 · 8 comments · Fixed by #935
Assignees

Comments

@indexexchange
Copy link
Contributor

Type of issue

Bug

Description

Following the prebid documentation, when setting sendStandardTargetting to false and adding in custom target names using adserverTargeting, the only expected targets should be the custom targets. However, if the bid has deal targets, the standard deal targets will not be suppressed. The custom targets will be set as well; however, the intended behaviour is not observed as the deal targets remain.

Steps to reproduce

pbjs.bidderSettings = {
        indexExchange: {
            sendStandardTargeting: false,
            adserverTargeting: [
                {
                    key: "ix_pbMg",
                    val: function(bidResponse) {
                        return bidResponse.pbMg;
                    }
                }, {
                    key: "ix_adId",
                    val: function(bidResponse) {
                        return bidResponse.adId;
                    }
                }
            ]
        }
    }
}

When returning deal bids for a slot, the following behaviour was observed for the targeting:

Expected results

Expected Targets:

ix_pbMg => 10.00
ix_adId => 787509879adc3b

Actual results

Unexpected Targets:

hb_deal => DEALID1
hb_deal_indexExchang => DEALID1
hb_bidder_indexExcha => indexExchange
hb_adid_indexExchang => 787509879adc3b
hb_pb_indexExchange => 10.00
hb_size_indexExchang => 728x90

Platform details

Versions 0.14+ are affected.

@snapwich
Copy link
Collaborator

the hb_deal_indexExchange, hb_bidder_indexExcha etc are coming from pbjs.enableSendAllBids(), so if you don't want those values you can remove that call from your implementation.

However, the hb_deal is an odd case when implementing sendStandardTargeting that I expected might come up in the future.

@mkendall07 the hb_deal is somewhat of a special case in that it is not listed in the standard keys within constants.json:TARGETING_KEYS nor does it have any entry in the result of function getStandardBidderSettings(). I'm guessing if we wanted to exclude hb_deal when sendStandardTargeting is disabled then hb_deal should be refactored to behave more like the other standard targeting values. Do you have a preference on how to handle this?

@indexexchange
Copy link
Contributor Author

the hb_deal_indexExchange, hb_bidder_indexExcha etc are coming from pbjs.enableSendAllBids()

We actually used an example where this is not set, as per the console:

>>> pbjs._sendAllBids // a flag that is set when pbjs.enableSendAllBids() is called.
false

The issue is that getDealTargeting() function sets deal targets regardless of send standard targeting option. In addition, there are other functions that set similar targets if a deal is returned:

  1. getWinningBidTargeting(adUnitCodes) always sets:
  • hb_deal
  1. getAlwaysUseBidTargeting(adUnitCodes) always sets:
  • hb_deal_bidderCode
  • hb_deal
  1. getDealTargeting(adUnitCodes) always sets:
  • hb_bidder_bidderCode
  • hb_adid_bidderCode
  • hb_size_bidderCode
  • hb_deal_bidderCode

@mkendall07
Copy link
Member

I don't like how this is currently implemented. I think it would be better if we included hb_deal in the standard keys and then automatically suppress it if the value is empty. I would prefer that to be the default, and then it could be disabled completely with sendStandardTargetting = true

How does that sound?

@indexexchange
Copy link
Contributor Author

I would prefer that to be the default, and then it could be disabled completely with sendStandardTargetting

That approach makes a lot of sense.

In terms of the _bidderCode targets -- do you consider those "standard" targets? We've encountered cases where these contribute to exceed the 2K maximum URL length generated by ad serving, which includes targets, and had expected only the custom targets to remain.

@mkendall07
Copy link
Member

mkendall07 commented Nov 28, 2016

No, I don't consider them "standard" as it's not on by default (you need to set/call . enableSendAllBids().

I would, however, consider using both of these settings at the same time to be invalid:
sendStandardTargetting = true
.enableSendAllBids(); //true

Is there a use case when you are doing that?

@mkendall07
Copy link
Member

Also, as an aside, do you know what the difference is here?

Google Publisher Tags: 4,096 characters
URLs generated by ad serving, such as DFP macros: 2,048 characters

My understanding is that GPT is the URL generated on page (which contains key/value pairs) and URLS generated by ad serving would be any further URLs generated from the creative... but not 100%.

@snapwich
Copy link
Collaborator

I don't like how this is currently implemented. I think it would be better if we included hb_deal in the standard keys and then automatically suppress it if the value is empty. I would prefer that to be the default, and then it could be disabled completely with sendStandardTargetting = true

I think this sounds ideal.

@indexexchange
Copy link
Contributor Author

Also, as an aside, do you know what the difference is here?

The GPT docs have been recently changed, but it's not entirely clear what the difference is. That being said, the extra key length can still contribute to either limit.

No, I don't consider them "standard" as it's not on by default

Fair enough -- but there does not appear to be any option to suppress the deal targets if sendStandardTargetting is disabled. Specifically, if googletag.enableSingleRequest() is in use, the deal targets can add ~200 characters per slot, per adapter, which rapidly adds up.

I would, however, consider using both of these settings at the same time to be invalid ... Is there a use case when you are doing that?

I would assume that pubs might simply turn on enableSendAllBids without disabling sendStandardTargetting since this wouldn't affect which DFP lines were activated, so this might happen inadvertently. For the case when we explicitly want custom ad server targets to be used, we always advise disabling the standard targets (which is how this issue was originally identified).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants