Skip to content

feat(Rtd): add a flag to disable the filtering of rtd module #7

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

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

Conversation

maelmrgt
Copy link

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

@maelmrgt maelmrgt requested a review from AlexisBRENON October 15, 2024 09:45
@@ -85,6 +85,7 @@ function processSuccessResponse(response, timeoutId, reqBidsConfigObj, greenbids

function updateAdUnitsBasedOnResponse(adUnits, responseAdUnits, greenbidsId) {
const isFilteringForced = getParameterByName('greenbids_force_filtering');
const isFilteringDisabled = getParameterByName('greenbids_disabled_filtering');

Choose a reason for hiding this comment

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

Stay consistent with the other parameter name.

Suggested change
const isFilteringDisabled = getParameterByName('greenbids_disabled_filtering');
const isFilteringDisabled = getParameterByName('greenbids_disable_filtering');

Comment on lines 97 to 102
if (isFilteringForced) {
adUnit.bids = [];
logInfo('Greenbids Rtd: filtering flag detected, forcing filtering of Rtd module.');
} else if (!matchingAdUnit.isExploration) {
} else if (!matchingAdUnit.isExploration & !isFilteringDisabled) {
removeFalseBidders(adUnit, matchingAdUnit);
}

Choose a reason for hiding this comment

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

suggestion: may I ask to rewrite the condition to make it more straight forward?

Suggested change
if (isFilteringForced) {
adUnit.bids = [];
logInfo('Greenbids Rtd: filtering flag detected, forcing filtering of Rtd module.');
} else if (!matchingAdUnit.isExploration) {
} else if (!matchingAdUnit.isExploration & !isFilteringDisabled) {
removeFalseBidders(adUnit, matchingAdUnit);
}
if (matchingAdUnit.isExploration || isFilteringDisabled) return; // Or you may log something
if (isFilteringForced) {
...
} else {
removeFalseBidders(...);
}

@maelmrgt maelmrgt requested a review from AlexisBRENON October 15, 2024 11:45
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.

2 participants