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

Apparent of mismatch in the documents related with "generateBid" JS method #102

Open
guybashan opened this issue Feb 26, 2024 · 1 comment

Comments

@guybashan
Copy link

It seems like there is a mismatch in the docs in the following URL:
https://developer.android.com/design-for-safety/privacy-sandbox/protected-audience#ad_cost

It writes that the generateBid function should return:
return {'bid': ..., 'adCost': ...,};

But it seems like the correct way is returning:
return {'status': status, 'ad': ad, 'bid': bid };

@syntxerror
Copy link

Hi @guybashan
The documentation you're pointing to is a specific use case where the goal is to return the cost per click. The adCost is stored in the contextual_signals param for the reportWin function. The goal of the function return is to show this specific use case and you are also correct that your understanding of the return structure is what it seems. If it would help your understanding and help others, would showing the return structure like so help with this:

return {'status': status, 'ad': ad, 'bid': bid, 'adCost': ...,};

This way, we can see that the adCost is acceptable and the documentation will provide context that adCost are stored as a contextual_signals.

Hope this helps.

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