-
Notifications
You must be signed in to change notification settings - Fork 76
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
isSafeFrame detection not detecting AMP forced SafeFrame #242
Comments
related: #107 the solution would close both i imagine |
#249 should produce the expected behavior in the OP:
However, I cannot get it to actually resize the ad. I don't know if that's what it's supposed to do; in the safeframe case the resizing is done by the Also, I could not find any way to detect an AMP environment. Our logic always runs in what looks like any other safeframe. |
did #107 or ampproject/amphtml#6829 not help? |
No,
does not work. I suspect there's something I don't know regarding how to set up the AMP page, the creative, or both. |
Describe the bug
While testing an integration in AMP environment, I encountered the issue of it not resizing the iframe. It turns out that the
isSafeFrame
check does not work for the forced SafeFrame by AMP.The moment SafeFrame is being enabled in GAM, the detection works.
prebid-universal-creative/src/environment.js
Lines 26 to 28 in 907ca91
The only workaround seems to be to create dedicated line items and creatives for AMP, which has SafeFrame enabled in GAM.
It might make sense to always send the resize message for AMP, if there is no possibility without SafeFrame.
prebid-universal-creative/src/mobileAndAmpRender.js
Line 65 in 907ca91
To Reproduce
Steps to reproduce the behavior:
isSafeFrame
, in amp.jsExpected behavior
Outgoing AMP
embed-siz
message when the creative does not have SafeFrame checked.The text was updated successfully, but these errors were encountered: