Clean buyer's auction-bidding-logic and seller's auction-decision-logic for Protected Audience to make the scripts more readable.
Changelog:
Update the top-level package.json file to run all pre-commit hooks with the fmt command.
Move all logic related to console logging from generateBid() and reportWin() in auction-bidding-logic and scoreAd() and reportResult() in auction-decision-logic to helper function: logContextForDemo().
Move the logic to check for campaign status in trustedBiddingSignals during generateBid() to helper function: isCurrentCampaignActive().
Move the logic to reject bids if creative is blocked by the publisher during scoreAd() to helper function: getRejectScoreIfCreativeBlocked().
Include buyer hostname and origin in buyerSignals returned along with the contextual bid response so that this is available in context for logging during reportWin().
Description
Clean buyer's
auction-bidding-logic
and seller'sauction-decision-logic
for Protected Audience to make the scripts more readable.Changelog:
package.json
file to run all pre-commit hooks with thefmt
command.generateBid()
andreportWin()
inauction-bidding-logic
andscoreAd()
andreportResult()
inauction-decision-logic
to helper function:logContextForDemo()
.trustedBiddingSignals
duringgenerateBid()
to helper function:isCurrentCampaignActive()
.scoreAd()
to helper function:getRejectScoreIfCreativeBlocked()
.buyerSignals
returned along with the contextual bid response so that this is available in context for logging duringreportWin()
.Affected services