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 · 0 comments
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
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

1 participant