function generateBid(ad, auction_signals, per_buyer_signals, trusted_bidding_signals, contextual_signals, custom_audience_bidding_signals) { if (custom_audience_bidding_signals.name === 'audience_group_1') { return {'status': 0, 'ad': ad, 'bid': 10 }; } else { return {'status': 0, 'ad': ad, 'bid': 5 }; } } function reportWin(ad_selection_signals, per_buyer_signals, signals_for_buyer, contextual_signals, custom_audience_reporting_signals) { let reporting_address = 'https://reporting.example.com'; let clickUri = reporting_address + '/buyerInteraction?click'; let viewUri = reporting_address + '/buyerInteraction?view'; const beacons = {'click': clickUri, 'view': viewUri}; registerAdBeacon(beacons); return {'status': 0, 'results': {'reporting_uri': 'https://reporting.example.com'} }; }