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

Protected Audience multi-seller auction demo #241

Merged
merged 16 commits into from
Feb 5, 2024
Merged

Conversation

kevinkiklee
Copy link
Contributor

@kevinkiklee kevinkiklee commented Jan 29, 2024

Description

This PR implements Protected Audience multi-seller auction. In a multi-seller auction, the winning ad can be a header bidding auction winner, an ad server auction winner, or a Protected Audience auction winner.

  • For header bidding and ad server auctions, the DSPs will provide a random bid value between 0 and 50.
  • For a Protected Audience auction, the DSPs will provide a random bid value between 0 and 100 in order to increase the likelihood of seeing a PA ad for demo purposes.
  • In this demo, the ad server acts as the top-level seller, but does not have to be. Any SSP can be the top-level seller.

To see the demo:

(This code has not been merged nor deployed to prod yet)

Related PR: #240

Instructions

To run the multi-seller demo:

  1. Visit the shop item page and add the query param ?auctionType=multi (https://privacy-sandbox-demos-shop.dev/items/1f45e?auctionType=multi)
  2. Visit the publisher page and add the query param ?auctionType=multi
    (https://privacy-sandbox-demos-news.dev/?auctionType=multi)

Services and libraries added

  • DSP-A / DSP-B / SSP-A / SSP-B have been added to act as participants in a multi-seller auction
  • Ad Server service has been added to host the ad server client-side library and to provide ad server auction result
  • Header bidding library has been added to fetch header bids from the participants. The lib is hosted on the publisher site.

Multi-slot capability

image

The ability to render multiple ads have been implemented via the ad server library. The publisher can define an adUnit that describes the ad. And each ad unit participates in one sequential auction.

Example usage:

const sellers = ['<%= SSP_A_HOST %>', '<%= SSP_B_HOST %>']
const imageIframeAdUnit = {
  divId: 'image-ad--iframe',
  type: 'image',
  size: [300, 250],
  isFencedFrame: false
}

const imageFencedFrameAdUnit = {
  divId: 'image-ad--fenced-frame',
  type: 'image',
  size: [300, 250],
  isFencedFrame: true
}

const videoIframeAdUnit = {
  divId: 'video-ad--iframe',
  type: 'video',
  size: [300, 250],
  isFencedFrame: false
}

startSequentialAuction(imageIframeAdUnit, sellers)
startSequentialAuction(imageFencedFrameAdUnit, sellers)
startSequentialAuction(videoIframeAdUnit, sellers)

Sequence

  1. The user is added to interest groups by DSP-A and DSP-B on the shop item page
  2. The user visits the publisher page
  3. The publisher page starts the Header Bidding auction
  4. The header bidding library receives the bids and component auction configs from SSP-A and SSP-B (the perBuyerSignals is gathered from DSP-A and DSP-B by both SSPs)
  5. The publisher page starts the Ad Server auction
  6. The ad server library receives the bids from SSP-A and SSP-B who gathered the bids from DSP-A and DSP-B
  7. The publisher page starts the Protected Audience auction
  8. The ad server library renders the winning ad

Affected services

  • Home
  • News
  • Shop
  • Travel
  • DSP
  • DSP-A
  • DSP-B
  • SSP
  • SSP-A
  • SSP-B
  • ALL
  • Ad-server

@kevinkiklee kevinkiklee changed the base branch from main to multi-seller January 29, 2024 19:24
@kevinkiklee kevinkiklee changed the base branch from multi-seller to dev February 1, 2024 00:41
@Seburan Seburan self-assigned this Feb 2, 2024
@Seburan Seburan requested a review from Svenmay February 2, 2024 00:50
@Seburan Seburan added this to the v1.3 milestone Feb 2, 2024
in order to allow communications between services using FQDN hostnames within the docker bridge network
Copy link
Member

@Svenmay Svenmay left a comment

Choose a reason for hiding this comment

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

I have added some comments where I believe we could improve the readability of the code. But I haven't found any major issues that should block submission.

Copy link
Contributor

@Seburan Seburan left a comment

Choose a reason for hiding this comment

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

please review my comments and let me know if that works for you

fixes multi-seller-auction demo to run both on docker & cloud run
kevinkiklee and others added 4 commits February 2, 2024 20:32
allows communications between services based :
.env -> with docker bridge network
.env.dev -> with Cloud Run / Firebase hosting
@Seburan Seburan mentioned this pull request Feb 5, 2024
7 tasks
@kevinkiklee kevinkiklee merged commit c69d56e into dev Feb 5, 2024
5 checks passed
@kevinkiklee kevinkiklee deleted the multi-seller-auction branch February 5, 2024 17:21
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.

4 participants