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

Audiencelogy Bid Adapter : Initial Release #11853

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

hasanideepak
Copy link
Contributor

Type of change

  • Bugfix

  • Feature

  • New bidder adapter

  • Updated bidder adapter

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

  • Other

Description of change

Other information

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. 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. 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. Keep up the great work! 🚀

Copy link
Collaborator

@patmmccann patmmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please import common functions from a library

dealId: bid && bid.dealId ? bid.dealId : undefined,
ttl: 300
const buildResponse = (bid) => {
let response = {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't accept changes designed to fool the duplication checker

Copy link
Contributor Author

@hasanideepak hasanideepak Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, we are an advertising tech company helping different clients like relevate health. We are fine with adding common code, please let me know where to add common functions in library?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Thank you. See #11854 for example or #11879

@ChrisHuie
Copy link
Collaborator

Please add docs to -> https://github.com/prebid/prebid.github.io

@hasanideepak
Copy link
Contributor Author

Copy link
Collaborator

@patmmccann patmmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, couple of tweaks and use of an import please

const setUser = (bid) => {
let user = {};
if (bid && bid.params) {
user.buyeruid = localStorage.getItem('adx_profile_guid') ? localStorage.getItem('adx_profile_guid') : '';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to import the storage manager to do this, publishers manage bidder access to storage depending on consent or their preferences

// Function to fetch bid_floor
const fetchFloor = (bid) => {
if (bid.params && bid.params.bid_floor) {
return bid.params.bid_floor;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to check the getFloor function from the request

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. 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. 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. 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. Keep up the great work! 🚀

@hasanideepak
Copy link
Contributor Author

@patmmccann I have added library audiencelogyUtils/bidderUtils.js and imported common code. Please verify.

@patmmccann
Copy link
Collaborator

@hasanideepak yes but you should also import in relevate, which has the same concern above, it uses local storage without importing storage manager

@hasanideepak
Copy link
Contributor Author

@hasanideepak yes but you should also import in relevate, which has the same concern above, it uses local storage without importing storage manager

There are two different fork repo for relevate and audiencelogy. I will need to add same library in relevate fork in order to use it, doesnt that give conflict error as same code will be there in audiencelogy and relevate?
I tried using storage manager, but it was unable to read the value from local storage. Can you please let me know some example.

@patmmccann
Copy link
Collaborator

I will need to add same library in relevate fork in order to use it, doesnt that give conflict error as same code will be there in audiencelogy and relevate?

both will import it, but the build will be more compact as the code will only be in the project once. It will clear the error.

tried using storage manager, but it was unable to read the value from local storage. Can you please let me know some example.

if (storage.localStorageIsEnabled()) {

What you have in relevate is a major rules violation, as it ignores consent. We need you to take care of it in this commit. I'll go ahead and submit a bug fix to delete what you are doing there now, so you'll want to merge in master after that merges to avoid merge conflicts

@hasanideepak
Copy link
Contributor Author

I will need to add same library in relevate fork in order to use it, doesnt that give conflict error as same code will be there in audiencelogy and relevate?

both will import it, but the build will be more compact as the code will only be in the project once. It will clear the error.

tried using storage manager, but it was unable to read the value from local storage. Can you please let me know some example.

if (storage.localStorageIsEnabled()) {

What you have in relevate is a major rules violation, as it ignores consent. We need you to take care of it in this commit. I'll go ahead and submit a bug fix to delete what you are doing there now, so you'll want to merge in master after that merges to avoid merge conflicts

@patmmccann Thank you for the support. So, I will make the changes for store manager in this PR (i.e.audiencelogy) and create a new PR for relevate adapter to import common library and store manager changes. Is this right ?
Merging both PR wont cause any conflicts ?

@patmmccann
Copy link
Collaborator

Just do it all in one?

@hasanideepak
Copy link
Contributor Author

@patmmccann Considering we are an ad tech service provider to relevate and we also need our own prebid adapter, we would like to focus on relevate adapter at this moment to make it fully compliant with your policies (with storage manager changes), hence we would like to pause work on our own adapter (i.e. audiencelogy) at this moment and we will revisit in a few weeks.
Thank you for your support

@patmmccann
Copy link
Collaborator

patmmccann commented Jul 3, 2024

No worries, just import storage manager instead of directly accessing local storage, keeping an eye out for your commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants