-
Notifications
You must be signed in to change notification settings - Fork 769
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
Issue with rendering native ads on amp pages #1806
Comments
We don't currently support native and AMP, at least we'd not specifically tested it. Honestly I'm not sure that AMP can do all the special javascript stuff the PUC wants to do here. So I tried to set up a test page and find that I can't enter a PBJS native creative in GAM. Here's what I did:
Setting the "Rendering Type" to "Standard and AMP" receives this error: Custom JavaScript is not allowed Please help us understand how you've set up the GAM creative. You're right that PBS isn't doing the native pre-processing for AMP. That might be the solution, but in order for us to test it, guidance on the ad server setup appreciated. |
To be honest, I didn't check if fixing the described issue would work. I'm now testing fixing the issue. For the ad manager setup I'm using the same setup as I'm using with mobile, described here. I see that the creative is returned from GAM and the native-trk.js library loads the assets and triggers the impression trackers but the ad is not rendered. There are no errors in the console regarding this. So it seems that it could be possible for amp to work with PUC but I'm not sure why the ad isn't showing. Could you please test it out and let me know? This is the patch for prebid-server that I'm testing with:
|
I don't see an issue in expanding the scope of that code to include all types rather than just The bit of code above was originally put into place, as the Native spec assumes that the caller knows what they requested. With the advent of apps calling PBS while leveraging stored requests, the app did not know what asset IDs were associated with what native types, so needed the return values to be labeled with the proper types so it would know how to display them. AMP is in the same boat, as it also needs to use stored request, and the page has no visibility into the details of the request that was sent. So in hindsight, it is obvious that AMP would need this functionality to properly display native content. |
Is it possible for us to determine that a given bidRequest was based off a stored request? Seems like that's the trigger for this behavior rather than either "all" or "app"? While it's fine to make this change, I feel like it's got a good chance of not working in the wild. AMP doesn't play nice with all javascript functionality. Still, PBS should do its part, then if PUC breaks, someone can suggest a fix to make it work in an AMP context. |
Fixed in PBS-Java 1.66 with prebid/prebid-server-java#1285 That said, I'm still not convinced this update is going to solve the underlying problem, which is that AMP doesn't much like javascript. If you find a workaround and can share a test page, we'd be happy to document for others. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Linking this to #1041 -- the solution to this issue is to do the "native type processing" for AMP as well as app. |
Hey! I
I’m running into an issue where a native amp ad does not render on the page, specifically I get
ERROR: Invalid image type for image asset
from the native-trk.js library.After digging a bit I see that the asset types are only set for requests from mobile apps (https://github.com/prebid/prebid-server/blob/master/exchange/bidder.go#L209) and the documentation states that amp pages should set the site object just as a regular page would (https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-amp.html).
This was discussed in #1041 but there’s no mention of amp pages. Was this overlooked or am I missing something?
The text was updated successfully, but these errors were encountered: