This PR sets up the loading mechanism for the B&A demo.
The code specific to a demo is now stored in the /uc-[USE_CASE_NAME]/. This approach has not been migrated to the existing demos using other DSPs and SSPs yet.
On the advertiser page, the tag loading is controlled with a switch statement:
switch ('<%= auctionType %>') {
case 'multi':
document.body.appendChild(dspAScript);
document.body.appendChild(dspBScript);
break;
case 'ba':
document.body.appendChild(dspAScript);
document.body.appendChild(dspBScript);
document.body.appendChild(dspXScript);
document.body.appendChild(dspYScript);
break;
default:
document.body.appendChild(dspScript);
}
Publisher (News)
Demo page
URL: https://privacy-sandbox-demos-news.dev/uc-ba
Code location: /news/views/uc-ba/index.ejs
The publisher page isn't constructed like the advertiser (shop) site where the pages are linked/related to one another. Therefore, I just added a whole new page to build the B&A demo to keep the code cleaner.
Description
This PR sets up the loading mechanism for the B&A demo.
The code specific to a demo is now stored in the
/uc-[USE_CASE_NAME]/
. This approach has not been migrated to the existing demos using other DSPs and SSPs yet.DSP
https://privacy-sandbox-demos-dsp-x.dev/uc-ba/join-ad-interest-group.html
/dsp-x/views/uc-ba/join-ad-interest-group.ejs
https://privacy-sandbox-demos-dsp-x.dev/uc-ba/js/bidding-logic.js
/dsp-x/uc-ba/js/bidding-logic.js
The route is matched like the following:
SSP
https://privacy-sandbox-demos-ssp-x.dev/uc-ba/js/decision-logic.js
/ssp-x/uc-ba/js/decision-logic.js
Advertiser (Shop)
https://privacy-sandbox-demos-shop.dev/items/1f45e?auctionType=ba
/shop/views/items.ejs
On the advertiser page, the tag loading is controlled with a switch statement:
Publisher (News)
https://privacy-sandbox-demos-news.dev/uc-ba
/news/views/uc-ba/index.ejs
The publisher page isn't constructed like the advertiser (shop) site where the pages are linked/related to one another. Therefore, I just added a whole new page to build the B&A demo to keep the code cleaner.
Affected services