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

v1.13 - mediaTypes banner sizes - not consistent? #2705

Closed brent-gourmetads closed 6 years ago

brent-gourmetads commented 6 years ago

Type of issue

I'd class this as a bug but i'm not certain if its purely prebid or related to the creative this may also be related to this issue https://github.com/prebid/Prebid.js/issues/2597

Description

we have a prebid placement on a page within the adUnit definition the mediaTypes banner supports 4 possible sizes

                code: 'ga_1299767',
            "mediaTypes": {
        banner: {
            sizes: sidebar_flex
        }
},
===================

          var sidebar_flex = [
                [300, 250],
                [300, 600],
                [160, 600],
                [120, 600],
        ];

occasionally when a placements wins and renders (say at 300x600) the 'utif' dynamic iframe containing the rendered ad content (created dynamically on render) sizes at 300x250 instead of the expected 300x600 which won the auction

result is a cut off creative since the content is at the bid/won size of 300x600 and the dynamic iframe is at the 300x250 size

this often seems to be attached to a specific creative

but its not 100% that and questions about that to the creative (rubicon) led back to questions about prebid?

Steps to reproduce

define a banner unit with varied mediaTypes sizes

Test page

you can see the behavior here: http://www.recipebridge.com/r/steak-recipes?pbjs_debug=true&ast_debug=true

(may have to refresh a few times - x600 has to win for the cutoff to happen)

Expected results

that the iframe of the placement size to match the winning bid which is chosen for render

Actual results

intermittently the iframe is smaller (300x250) on a 300x600 win cutoff_recipebridge_rubicon_x600_won dynamic_iframe_cutoff_recipebridge

Platform details

using INFO: Prebid.js v1.13.0-pre loaded and AST library loaded: 0.15.1

Other information

possibly related? https://github.com/prebid/Prebid.js/issues/2597

brent-gourmetads commented 6 years ago

just to clarify that specific ad unit is the upper right sidebar unit

full prebid config here: http://bcdn.grmtas.com/pub/ga_pub_359.js
chefbenjamin commented 6 years ago

Just to add here we see this across all bidders not just Rubicon.

We have also today upgraded to Appnexus AST 0.16.2 and the issues still exists.

We are not sure if this is a Prebid related issue or Appnexus Ad Server related issue.

bretg commented 6 years ago

@brent-gourmetads - what creative do you have in the ad server? Is it the standard call to w.pbjs.renderAd() or the Prebid 'universal creative'?

brent-gourmetads commented 6 years ago

hey @bretg - thanks for asking

we use a renderAd call with the various bidders

it will look something like this:

==================

where would vary by the type of bidder (rubicon, indexexchange etc) (also note we use a custom pbjs prefixed with ga_ to avoid namespace colissions

==================

brent-gourmetads commented 6 years ago

code cutoff the advertiser - lets try that again

==========

bretg commented 6 years ago

I'm not seeing this clipping issue despite reloading quite a few times -- any tips to reproduce the issue -- like coming from a particular geo?

If I could see it happening, would look at what bids were sent to the ad server -- make sure that the sizes sent to the ad server match the actual bids. e.g. the call to http://ib.adnxs.com/ut/v3

...
                {
                    "key": "HB_SIZE",
                    "value": [
                        "300x250"
                    ]
                },
...

and checking the response to see if the json sized the winning ad properly.

aneuway2 commented 6 years ago

Appears that there is a report of this as well in reddit: https://www.reddit.com/r/adops/comments/8pld1q/prebid_header_bidding_creative_cut_off/

Also have seen this behavior on these URLs where the wrong size creative was showing on this URL:

brent-gourmetads commented 6 years ago

@bretg its odd that you don't see it in the page http://www.recipebridge.com/r/steak-recipes?pbjs_debug=true&ast_debug=true

I see it almost every page load (in fact the first time i went there this morning it was present)

I've attached a few screen shots showing the prebid render of the 300x600 and the v3 showing the x250 creative (which maybe determines the size of the spot on the screen?)

it does seem to happen quite frequently - maybe something to do with my cookies for the frequency?

300x600prebid_won v3_cutoff cutoff_again

aneuway2 commented 6 years ago

From my diagnostic look at this, this may be related to the response back from Prebid Server.

In the case of this placement in AppNexus, it is configured to only return a 320x50 and the labels also restrict this but bids are returned for a 728x90 and 320x50:

{
    "id": "2811a43d-90ce-4f3d-b519-2c13bfd9fed1",
    "seatbid": [{
        "bid": [{
            "id": "4117316931437067423",
            "impid": "/1018099/TD_Forum_Leader_RWD",
            "price": 8.287500,
            "adid": "55783512",
            "adm": "<script src=\"https://nym1-ib.adnxs.com/ab?e=wqT_3QLbBvBKWwMAAAMA1gAFAQj1iIbZBRCvxueQ4r-z2DAYiJ2bu_7irdwyKjYJ______9_I0ARMzM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%3A%2F%2Fwww.tigerdroppings.com%2Frant%2Flsu-sports%2F%3Fpbjs_debug%3Dtrue&pp=${AUCTION_PRICE}\"></script>",
            "adomain": ["appnexus.com"],
            "iurl": "https://nym1-ib.adnxs.com/cr?id=55783512",
            "cid": "882",
            "crid": "55783512",
            "cat": ["IAB3-1"],
            "h": 90,
            "w": 728,
            "ext": {
                "appnexus": {
                    "brand_id": 350,
                    "auction_id": 3508530601099125551,
                    "bidder_id": 2,
                    "bid_ad_type": 0
                }
            }
        }],
        "seat": "882"
    }, {
        "bid": [{
            "id": "3138335207625840048",
            "impid": "/1018099/TD_Forum_Leader_RWD",
            "price": 8.287500,
            "adid": "55784552",
            "adm": "<script src=\"https://nym1-ib.adnxs.com/ab?e=wqT_3QLbBvBKWwMAAAMA1gAFAQj1iIbZBRD73pLx8cHGyF4YiJ2bu_7irdwyKjYJ______9_I0ARMzMzMzOTIEAZAAAA4FG4AkAhAAAAAACAKUApAQgUAAAuQDFmBQGw5j8wzZuxBjiXSkDyBkgCUOjozBpY0axdYABom4V3eMC5BIABAYoBA1VTRJIBAQbwUpgBwAKgATKoAQGwAQC4AQLAAQXIAQLQAQnYAQDgAQDwAQCKAjt1ZignYScsIDEzNjMzNzgsIDE1Mjg5MjMyNTMpO3VmKCdyJywgNTU3ODQ1NTIsMh4A8IqSAoECIWlqWG9kQWkzNElRSEVPam96Qm9ZQUNEUnJGMHdBRGdBUUFCSThnWlF6WnV4QmxnQVlQZ0ZhQUJ3T25qNkdJQUI2ak9JQVFhUUFRR1lBUUdnQVFHb0FRT3dBUUM1QWUwRW9QWUFBQzVBd1FIdEJLRDJBQUF1UU1rQkFBQUFBQUFBOERfWkFRCQy4QVBBXzRBRUE5UUVBQUVCQWdBSUFpQUszc0tFRGtBSUJtQUlBb0FJQXFBSUF0UUkFNQB2DQiId0FJQXlBSUE0QUlBNkFJQS1BSUFnQU1Ca0FNQW1BTUJxQU8F5GB1Z01KVGxsTk1qb3pOakV3mgItIW1Ba3hyOgQBKDBheGRJQUFvQURvMjAA8NjYAgDgAqeoSOoCP2h0dHBzOi8vd3d3LnRpZ2VyZHJvcHBpbmdzLmNvbS9yYW50L2xzdS1zcG9ydHMvP3BianNfZGVidWc9dHJ1ZYADAIgDAZADAJgDFKADAaoDAMADrALIAwDYA7xF4AMA6AMB-AMDgAQAkgQJL29wZW5ydGIymAQAogQPMjA3LjIzNy4xNTAuMjQ2qAT8ngSyBAwIABAAGAAgADAAOAC4BADABADIBADSBA04ODIjTllNMjozNjEw2gQCCAHgBADwBOjozBqIBQGYBQCgBf__RdK4__8BqgUkMjgxMWE0M2QtOTBjZS00ZjNkLWI1MTktMmMxM2JmZDlmZWQxwAUAyQVJ4hTwP9IFCQkJDGwAANgFAeAFAfAF3gL6BQQIABAAkAYAmAYAuAYA&s=b390f6256cf27507d06705518c253010046cf705&referrer=https%3A%2F%2Fwww.tigerdroppings.com%2Frant%2Flsu-sports%2F%3Fpbjs_debug%3Dtrue&pp=${AUCTION_PRICE}\"></script>",
            "adomain": ["appnexus.com"],
            "iurl": "https://nym1-ib.adnxs.com/cr?id=55784552",
            "cid": "882",
            "crid": "55784552",
            "cat": ["IAB3-1"],
            "h": 50,
            "w": 320,
            "ext": {
                "appnexus": {
                    "brand_id": 350,
                    "auction_id": 6814256363420823419,
                    "bidder_id": 2,
                    "bid_ad_type": 0
                }
            }
        }],
        "seat": "882"
    }],
    "bidid": "8645642931165360102",
    "cur": "USD"
}
brent-gourmetads commented 6 years ago

@aneuway2 are you sure you're looking at the right placement?

in appnexus this is 1299767

https://console.appnexus.com/placement?id=180987

this should be defined as a sizeless placement Resize placement if creative size is different from placement

and in this case the specific issue is that a 300x600 win is rendering into a iframe created at 300x250

aneuway2 commented 6 years ago

Hey @brent-gourmetads sorry I should have elaborated that this is what I saw from the other site where we saw this -- tigerdroppings (ill see if i can get the same for your example)

chefbenjamin commented 6 years ago

Curious if anyone has found the root cause of this yet ?

jsnellbaker commented 6 years ago

I'm investigating into the issue currently. I hope to post a finding soon.

To clarify - I am able to replicate the behavior on my Chrome browser. It's taking a few refreshes to get it to happen (like originally described).

brent-gourmetads commented 6 years ago

thank you everyone who investigated this issue:

We've resolved it down to this change made to prebid.js to support confiant for ad blocking on malicious/spam adverts

our final code:

    } else if (ad) {
      setRenderSize(doc, width, height);

// Optional: list of bidders that don't need wrapping var confiantExcludeBidders = ["bidder1", "bidder2", "bidder3"]; var confiantWrap = function (a,b,c,d,e,f){function g(a){return(l(a)||"")rr}function h(b,c,d){var e=v+m(b)+"&d="+c,f="err__"+1*new Date;j[f]=d;var g="<"+p+" on"+s+'="void('+f+'())" '+q+'="'+e+'" type="text/java'+p+'" ></'+p+">";au}function i(){var c=g(f+"/"+w.k.hb_bidder[0]+":"+w.k.hb_size[0]),d={wh:c,wd:k.parse(kt),wr:0};h(c,g(kt),function(){au});var e={d:d,t:b};j[f]={},j[f][c]=e}var j=a.parentWindow||a.defaultView,k=j.JSON,l=j.btoa,m=j.encodeURIComponent;if(!k||!l)return!1;var n="t",o="i",p="script",q="src",r="replace",s="error",t="stringify",u="wr"+o+n+"e",v="https://"+e+"/?wrapper="+m(f)+"&tpid=",w={k:{hb_bidder:[c],hb_size:[d]}};return i(),a.close(),!0}; // Serve with Confiant or default to regular ad serving // Replace CONFIANT_CDN and CONFIANT_ID with your account information if (confiantExcludeBidders.includes(bid.bidder) || !confiantWrap(doc, ad, bid.bidder, width + 'x' + height, 'XXXXX', 'XXXX')) { doc.write(ad); doc.close(); // setRenderSize(doc, width, height); utils.callBurl(bid); } } else if (adUrl) {

this is a common change that all users of confiant for prebid will use and the key bit is that in the unaltered prebid.js (lines 258-263)

========== } else if (ad) { doc.write(ad); doc.close(); setRenderSize(doc, width, height); utils.callBurl(bid); } else if (adUrl) {

so with the confiant code the key action was to invoke the setRenderSize REGARDLESS of the confiant action - our inital usage was just to drop ALL the default logic into the 'IF confiant good THEN' block -- the correct usage is to move the setRenderSize to the top (as shown above in the 'our final code' block') and retain the other operations in the 'IF confiant good THEN' block

=====================

I'm going to close this issue as fixed - hopefully this will help others who might be implementing confiant (a fantastic product and well worth their integration btw)

cheers