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

Native v2 - macros don't convert

Open coreyb-cbs opened this issue 5 years ago • 2 comments

Type of issue

bug

Description

I am seeing inconsistent results with the new Native v2 implementation. On some occasions, the macros are not converting to their value - they remain in their ##hb_placeholder_name## format. The new native-render.js loads perfectly each time (seeing a 200 status). Does the new native_render.js have a timeout or something in place where the ad will render without converting the macros?

Steps to reproduce

I am able to witness the issue occasionally on my standalone demo page by simply refreshing repeatedly.

Test page

https://rev.cbsi.com/corey/test/prebid_native/prebid-native-fluid.html

Expected results

Screen Shot 2021-02-25 at 4 41 05 PM

Actual results

Screen Shot 2021-02-25 at 4 40 54 PM

coreyb-cbs avatar Feb 25 '21 21:02 coreyb-cbs

@coreyb-cbs - thanks for the nice test page. This is a problem with your line item targeting.

The call to appnexus is timing out so the call to GAM is going out without any hb_ variables. Your test line item needs to be targeted to something. Real-world line items are targeted to hb_pb, but I'll target test line items sometimes to hb_format or hb_bidder... really anything that makes sure there's an actual bid before choosing that line item.

You're seeing the unresolved ##macros## because there's no winning ad. I suppose we could have native_render.js remove any ##macros## that it can't resolve, but that wouldn't actually help much -- you'd still have the frame of a native ad that's essentially empty. Targeting towards valid bids is the first thing to do here.

bretg avatar Feb 26 '21 14:02 bretg

@bretg Thanks for taking a look. I see it now... it's indeed a no-bid scenario. I'm running this out of our test network so I'll have to add the hb keys and update the line accordingly.

To your point, I could see the case for native_render.js to handle this gracefully... killing the frame's contents and perhaps providing some messaging? Not critical, but would be nice.

coreyb-cbs avatar Feb 26 '21 16:02 coreyb-cbs