Skip to content
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

Prebid.js: new PAAPI module documentation #5135

Merged
merged 6 commits into from
Apr 19, 2024
Merged

Conversation

dgirardi
Copy link
Contributor

@dgirardi dgirardi commented Feb 6, 2024

Prebid.js paapi and fledgeForGpt module doc updates - prebid/Prebid.js#10930

🏷 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

Copy link

netlify bot commented Feb 6, 2024

Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit c00f566
🔍 Latest deploy log https://app.netlify.com/sites/prebid-docs-preview/deploys/65dca941d3ed8a0008d23784
😎 Deploy Preview https://deploy-preview-5135--prebid-docs-preview.netlify.app/dev-docs/modules/fledgeforgpt
📱 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.

@jdwieland8282
Copy link
Member

I thought this module was meant to run independently from gpt.js / GAM?

pbjs.setConfig({
paapi: {
enabled: true,
bidders: ['openx', 'rtbhouse'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: given that the default is "all bidders", shouldn't the example omit this parameter?


```js
pbjs.setBidderConfig({
bidders: ["openx"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: should this be a generic bidder adapter name, like we have for other parameters?

selectively test with one or more bidders as they desire. To enable one or more bidders, use the `setBidderConfig` method
of Prebid.js:
```bash
gulp build --modules=fledgeForGpt,...
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verifying that this module name is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an existing module so renaming it is a breaking change and needs to wait for a major version release.

| ------------ | ------------ | ------------ |------------ |
| fledgeEnabled | Boolean | Enable/disable a bidder to participate in FLEDGE | Defaults to `false` |
|defaultForSlots | Number |Default value for `imp.ext.ae` in requests for specified bidders |Should be 1|
- include this module with your Prebid.js bundle; this also automatically includes the [PAAPI module](/dev-docs/modules/paapi.html)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the the two similarly named modules confusing. Perhaps it is clear to folks that swim with modules regularly, but is there an explanation or diagram?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One provides support for paapi; the other adds integration between paapi and gpt. This is stated in the overview. I'm not sure if you mean that's not clear enough, or if something else still needs to be explained (what?)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that flipping between source and rich diff.

{: .table .table-bordered .table-striped }
|Name |Type |Description |Notes |
| ------------ | ------------ | ------------ |------------ |
| fledgeEnabled | Boolean | Enable/disable a bidder to participate in FLEDGE | Defaults to `false` |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this can't be renamed since it would break existing deployed configs.
Could a future looking replacement be introduced, e.g. paapiEnabled, with fledgeEnabled deprecated down the road?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we eventually should deprecate this entirely; it's redundant with paapi.enabled (and fledge.enabled). If for consistency we also introduce paapiEnabled, we'll have two things to deprecate.

## Related Reading

- [fledgeForGpt module](/dev-docs/modules/fledgeForGpt.html)
- [FLEDGE](https://github.com/WICG/turtledove/blob/main/FLEDGE.md)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest


Configure GPT slots to use PAAPI.

**Kind**: static method of pbjs API. Only available when the [fledgeForGpt module](/dev-docs/modules/fledgeForGpt.html) is installed.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sibling pbjs.getPAAPIConfig method above indicates this is associated with the PAAPI module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but setPAAPIConfigForGpt is, as the name suggests, specific to GPT and requires the fledgeForGpt module.

layout: page_v2
page_type: module
title: Module - PAAPI
description: Protected audience API
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protected audience API

s/b

Protected Audience API

@rdgordon-index
Copy link

@dgirardi -- the fact that the module creates an auctionSignals.prebid object -- and what's included therein (added in prebid/Prebid.js#10649) is not mentioned in the documentation -- this PR seems like a good opportunity to capture what setFPDSignals(componentAuctionConfig, {ortb2, ortb2Imp}) actually does, as this in made directly available to all PAAPI functions.

ext: {
ae: 1
pbjs.setConfig({
paapi: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fledgeForGpt.autoconfig is also supported for now. I think it worth mentioning it since it backwards compatible in the current versions.

pbjs.setConfig({
    fledgeForGpt: {
        autoconfig: false
    }
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That being said, it does produce a warning.

3. Publisher Prebid.js configuration (detailed above)

When a bid request is FLEDGE enabled, a bid adapter can return a tuple consisting of bids and AuctionConfig objects rather than just a list of bids:
You may then use `setPAAPIConfigForGPT`, typically from a `bidsBackHandler`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add more context here to ensure pbjs.setPAAPIConfigForGPT(); function is invoked within the bidsBackHandler whenever new bids are requested, such as when refreshing adSlots. This is important because auctionConfig needs to be linked with a GPT slot manually when autoconfig is disabled.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muuki88
Copy link
Contributor

muuki88 commented Mar 21, 2024

@ChrisHuie will take a look at your comments @lksharma and make the requested changes.

We would then like to merge this to have some documentation at all. @dgirardi , @patmmccann , @dmdabbs would that be fine with you folks?

@jdwieland8282
Copy link
Member

@muuki88 , I'd like to make sure @rdgordon-index signs off before we merge this PR, he's been very close to the testing and has been keeping the ID PMC abreast of our progress here.

@patmmccann patmmccann merged commit 8bac533 into prebid:master Apr 19, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants