Skip to content

Document JS dynamic creatives#5120

Merged
bretg merged 1 commit intoprebid:masterfrom
dgirardi:pucless-render
Apr 3, 2024
Merged

Document JS dynamic creatives#5120
bretg merged 1 commit intoprebid:masterfrom
dgirardi:pucless-render

Conversation

@dgirardi
Copy link
Copy Markdown
Contributor

Document new option to set up creatives with Prebid.js - prebid/Prebid.js#10819

Note

There are many references to PUC in native documentation that shoud, but did not, get updated:

https://docs.prebid.org/prebid/native-implementation.html

I am not sure on how to approach it because:

  • the doc seem to assume that the only way to do native is to use Prebid.js. If that's true (I don't think it's supposed to be), the new approach is just better than PUC. I can't find an example on how to set up native creatives when using AMP/mobile SDKs.
  • there's a lot of emphasis put on the sendTargetingKeys and requestAllAssets options. Those are irrelevant for the new approach. The first may be relevant for AMP/mobile - again, I don't know if those work at all. The second is, to the best of my knowledge, just a relic and there's never a reason not set it to true.

To me it looks like native docs need an overhaul which is a bit more than I am prepared to chew for this feature.

🏷 Type of documentation

  • new feature

📋 Checklist

  • Related pull requests in prebid.js or server are linked -> Paste link in this list or reference it on the PR itself

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 31, 2024

Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit f1e1377
🔍 Latest deploy log https://app.netlify.com/sites/prebid-docs-preview/deploys/65ba7d9fe76ddb00081d1a0e
😎 Deploy Preview https://deploy-preview-5120--prebid-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@muuki88
Copy link
Copy Markdown
Contributor

muuki88 commented Feb 4, 2024

Hi

Thanks for this initial docs. We are using prebid native through GAM native designs.

the doc seems to assume that the only way to do native is to use Prebid.js. If that's true (I don't think it's supposed to be), the new approach is just better than PUC.

Do you mean that there's a need for prebidjs in order to support native? This is IMHO not true, as native can be requested via prebid server as well, and thus rendered too.

I can't find an example on how to set up native creatives when using AMP/mobile SDKs.

We have never get passed web, as native demand was basically none existent for us . However the initial approach, send all assets via key values, should support AMP. If all assets are sent as key values, they can be accessed through macros and used in native design templates

there's a lot of emphasis put on the sendTargetingKeys and requestAllAssets options. Those are irrelevant for the new approach. The first may be relevant for AMP/mobile - again, I don't know if those work at all.

IIRC requestAllAssets only works with prebidjs, as this is basically a post message call into the ad iframe.

sendTargetingKeys is the initial way to send all assets as key values. Which IMHO doesn't work well, if the assets are too large. GAM sends GET requests and truncates key values if it gets too long.

The second is, to the best of my knowledge, just a relic and there's never a reason not set it to true.

That is true. I guess 🤔

@dgirardi
Copy link
Copy Markdown
Contributor Author

dgirardi commented Feb 5, 2024

Do you mean that there's a need for prebidjs in order to support native? This is IMHO not true, as native can be requested via prebid server as well, and thus rendered too.

That sounds right, but otoh, how? I was stuck in trying to update that page, since I've never seen it done and it only talks about JS.

@muuki88 muuki88 self-requested a review February 8, 2024 15:22
Comment thread adops/js-dynamic-creative.md
Comment thread dev-docs/modules/nativeRendering.md
@bretg
Copy link
Copy Markdown
Contributor

bretg commented Feb 12, 2024

Looking over it quickly:

  • sendTargetingKeys is clearly marked as deprecated and the examples all show sending "false". This was all important when we were just cutting over to the new and better approach.
  • requestAllAssets... I don't remember the details here, but must be that requestAllAssets defaulted to false at one point?

Here's an older test creative I found in our GAM instance. Besides the source of the script being a pre-release version, the gist is similar to what's documented at https://docs.prebid.org/adops/gam-native.html

<script src="https://HOST/rp-eng-soln/prebid/native-render-qa.js"></script>
<script>
    	let pbNativeTagData = {};
             pbNativeTagData.pubUrl = "%%PATTERN:url%%";
             pbNativeTagData.adId = "%%PATTERN:hb_adId%%";
             pbNativeTagData.requestAllAssets = true;
        window.pbNativeTag.renderNativeAd(pbNativeTagData);
</script>

We recently tested something along these lines with in-app mobile native, and didn't get complaints. Will bring it up again with the testers to make sure this specific case worked.

So bottom line is I don't see a major problem with https://docs.prebid.org/prebid/native-implementation.html except that mobile rendering is way more complicated now that there are multiple ways of rendering every type of creative. So it is lacking all the mobile native rendering choices, but I'm not qualified to add those.

@bretg
Copy link
Copy Markdown
Contributor

bretg commented Feb 13, 2024

Ok, worked with our PostIndustria contact and found that there are indeed issues with the docs. It's on my list, but may take a few weeks to resolve.

@bretg bretg merged commit 4a4b5bf into prebid:master Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants