ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

amp-ad: OpenX Not passing DFP attributes, other than slot #9312

Closed krcrawford closed 7 years ago

krcrawford commented 7 years ago

Using <amp-ad type="openx">, data-dfp-* values other than data-dfp-slot are not passed to DoubleClick as documentation suggests:

OpenX Bidder

OpenX header bidding. Parameters noted in the Doubleclick amp-ad documentation can be forwarded to Doubleclick by the following rules:

Parameters like data-dfp-{name} will be converted to data-{name} and passed to Doubleclick

Load several consecutive ads with similar attributes, (six in my case)

<amp-ad width="728" height="90"
      type="openx"
      data-host="domain.openx.net"
      data-auid="12345"
      data-nc="56789-MySite"
      data-dfp-slot="/12345/dfp_zone"
      data-dfp-multi-size="970x91,960x91,728x90,900x71" // this being the suggested approach above
      json='{"dfp":{"targeting":{"sport":["rugby","cricket"]},"categoryExclusions":["health"],"tagForChildDirectedTreatment":1},"openx":{"customVars":{"marco":"polo","fates":["clothos","lachesis","atropos"]}}}'>
</amp-ad>

Error:

2017-05-12 13:59:15.959 3p.js:284 Uncaught Error: Unknown attribute for openx: dfpMultiSize.
    at J (3p.js:284)
    at D.openx (3p.js:216)
    at la (3p.js:62)
    at ac (3p.js:59)
    at window.draw3p (integration.js:415)
    at VM123012 frame.html:9
J @ 3p.js:284
D.openx @ 3p.js:216
la @ 3p.js:62
ac @ 3p.js:59
window.draw3p @ integration.js:415
(anonymous) @ VM123012 frame.html:9

2017-05-12 13:59:16.273 f.js:8 Error: Unknown attribute for openx: dfpMultiSize.
    at J (3p.js:284)
    at S (3p.js:216)
    at callback (doubleclick.js:38)
    at n.m [as requestAdServer] (jstag?nc=**********:12)
    at i (jstag?nc=**********:12)
    at n.E.init (jstag?nc=**********:12)
    at Object.init (jstag?nc=**********:12)
    at Object.<anonymous> (jstag?nc=**********:12)
    at t (jstag?nc=**********:11)
    at Object.<anonymous> (jstag?nc=**********:11)
(anonymous) @ f.js:8

2017-05-12 13:59:16.274 3p.js:284 Uncaught Error: Unknown attribute for openx: dfpMultiSize.
    at J (3p.js:284)
    at S (3p.js:216)
    at callback (doubleclick.js:38)
    at n.m [as requestAdServer] (jstag?nc=**********:12)
    at i (jstag?nc=**********:12)
    at n.E.init (jstag?nc=**********:12)
    at Object.init (jstag?nc=**********:12)
    at Object.<anonymous> (jstag?nc=**********:12)
    at t (jstag?nc=**********:11)
    at Object.<anonymous> (jstag?nc=**********:11)

Browser: Chrome Version 57.0.2987.133 (64-bit) AMP Version: 1494446565961

krcrawford commented 7 years ago

This seems to be a data validator issue where openx amp-ad is trying to validate the data intended for dfp, and thus fails in 3p:validateData.

Occurrence seems arbitrary.

lannka commented 7 years ago

@krcrawford are you a user of openx? can you report bug to openx? a temp fix might be removing this line, but just want to make sure openx is aware of this change.

krcrawford commented 7 years ago

From OpenX Sr.

There are known bugs with our AMP integration, and we have recently begun alpha testing a new solution.

jasti commented 7 years ago

Thanks, closing here since it's not a core AMP issue.