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

Parameter: "auction_signals" are not delegated properly to generateBid #131

Open
guybashan opened this issue Nov 6, 2024 · 1 comment
Open

Comments

@guybashan
Copy link

guybashan commented Nov 6, 2024

I assume that when sending: setAdSelectionSignals it translates to: auction_signals in generateBid.
As a side note: the naming inconsistencies are confusing and make it hard to track.

This is my Android code:

        mAdSelectionConfig = new AdSelectionConfig.Builder()
                .setSeller(seller)
                .setDecisionLogicUri(decisionUri)
                .setCustomAudienceBuyers(buyers)
                .setAdSelectionSignals(AdSelectionSignals.fromString("{ \"dimensions\": \"320x50\", \"ad_type\": \"banner\" }"))
                .setSellerSignals(AdSelectionSignals.fromString("{ \"seller_signal1\": 1, \"seller_signal2\": 2 }"))
                .setPerBuyerSignals(buyers.stream()
                        .collect(Collectors.toMap(
                                buyer -> buyer,
                                buyer -> AdSelectionSignals.fromString("{ \"dimensions\": \"320x50\", \"ad_type\": \"banner\" }")
                        )))
                .setTrustedScoringSignalsUri(trustedDataUri)
                .build();

When I add the following code to generateBid I get no ads selected. Since I have no way of debugging the values of parameters, I can only assume that the value doesn't exist:

function slotValid(ad, auction_signals) {
    const slotType = auction_signals.ad_type;

    if (ad.metadata.ad_type !== slotType) {
        return false;
    }

    return true;
}
@guybashan guybashan changed the title Parameter: "auction_sginals" are not delegated properly to generateBid Parameter: "auction_signals" are not delegated properly to generateBid Nov 6, 2024
@c4mb0t
Copy link

c4mb0t commented Dec 19, 2024

I assume that when sending: setAdSelectionSignals it translates to: auction_signals in generateBid.

Yes, that is correct.

When I add the following code to generateBid I get no ads selected.

I set up similar code, but I can't reproduce your issue. I am seeing auction_signals in generateBid getting populated from the value passed to setAdSelectionSignals. Can you check if you are also setting ad.metadata.ad_type? Otherwise, can you share additional code / logs to help reproduce the issue?

I have no way of debugging the values of parameters

Thanks for sharing this feedback; the lack of debuggability in the JS sandbox is something we are aware of and are investigating how it can be improved.

As a side note: the naming inconsistencies are confusing and make it hard to track.

Agreed that this naming is inconsistent for the on-device auction flow. In the Bidding & Auction server (B&A) flow, these fields are named more consistently. We're currently in the process of updating our documentation to focus more on B&A auctions.

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

No branches or pull requests

2 participants