Skip to content

Freedom Ad Network Bidder Adapter: Update to new API (master branch) #13496

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

Merged
merged 6 commits into from
Jul 30, 2025

Conversation

klaussilveira
Copy link
Contributor

Type of change

  • Updated bidder adapter

Description of change

Updated the Freedom Ad Network adapter to speak OpenRTB directly instead of the old proprietary protocol. Now every bid request is built as a standard OpenRTB 2.x JSON payload (impressions, device, user, etc.), and every response is parsed from an OpenRTB seatbid/bid structure. It uses the recommended Prebid.js ORTB converter and follows best practices from Prebid.js.

Automated tests were also updated cover the new OpenRTB flows, adding unit tests that verify correct construction of imp[] objects, parsing of seatbid responses, and proper routing to each FAN sub‑network. In addition, we implemented user synchronization URLs (syncUrls) so that Prebid can load pixel or iframe sync endpoints for each FAN segment. Finally, consent handling was improved by mapping GDPR and CCPA signals into the OpenRTB regs and user.ext blocks, so the adapter now respects publisher‑provided consent strings and only bids when allowed.

Copy link

github-actions bot commented Jul 2, 2025

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@klaussilveira
Copy link
Contributor Author

Would it make sense to extract this common bid floor selection mechanism into a library or inside util?

@dgirardi
Copy link
Collaborator

dgirardi commented Jul 2, 2025

Would it make sense to extract this common bid floor selection mechanism into a library or inside util?

ortbConverter comes with some common logic already - it's not quite the same as what you have here (imp.bidfloor is set by asking for mediaType: '*', meaning it returns what the publisher / floors provider set as a generic floor, and granular floors are set in each imp.<mediaType>.ext.bidfloor as well as in each imp.banner.format[].ext.bidfloor).

If you do prefer to look for the minimum then yes, extracting a shared library is better. Note however that a bid at the minimum floor may actually be below the floor and rejected by the priceFloors module (if it's not for the mediaType / format that had that floor).

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@klaussilveira
Copy link
Contributor Author

@patmmccann finally had time to address your comments, thank you for the insights! Let me know if anything else is needed.

@klaussilveira klaussilveira requested a review from patmmccann July 15, 2025 21:15
@klaussilveira
Copy link
Contributor Author

@ChrisHuie any way I can run the e2e again for the same PR, or are some of those failing "normal"?

@patmmccann
Copy link
Collaborator

are and mediasniper the same company?

@klaussilveira
Copy link
Contributor Author

Nope, just used their implementation as guidance and had not realized a generic bidFloor routine was available.

@patmmccann
Copy link
Collaborator

Did you notice the automated alert? Overriding text plain to json has performance issue s

@klaussilveira
Copy link
Contributor Author

klaussilveira commented Jul 28, 2025

@patmmccann oops, missed that. Just pushed a fix.

Thanks for the help!

@patmmccann
Copy link
Collaborator

Your latest commit causes your tests to fail

@patmmccann patmmccann merged commit 8823df0 into prebid:master Jul 30, 2025
20 checks passed
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

Successfully merging this pull request may close these issues.

3 participants