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

AdHash Bid Adapter: brand safety changes #11617

Merged
merged 41 commits into from
Jun 8, 2024
Merged

Conversation

wyand-sp
Copy link
Contributor

@wyand-sp wyand-sp commented May 30, 2024

Changing the recent ads calculations to the latest supported version.
Removed the usage of body.innerText

Type of change

  • Feature
  • Build related changes

Description of change

Changing the recent ads calculations to the latest supported version.
Removed the usage of body.innerText as needed in Prebid JS 9.0

wyand-sp and others added 30 commits January 7, 2022 12:16
We're operating on a com TLD now.
Added publisher in URL for easier routing.
Implemented brand safety checks
Removing the extra information as request data becomes too big and is sometimes truncated
Ad fraud prevention formula changed to support negative values as well as linear distribution of article length
Adding starts-with and ends-with rules that will help us with languages such as German where a single word can be written in multiple ways depending on the gender and grammatical case.
Added support for Cyrillic characters.
Added support for bidderURL parameter.
Fixed score multiplier from 500 to 1000.
Support for recent ads which gives us the option to do frequency and recency capping.
Added logic for measuring the fill rate (fallbacks) for Prebid impressions
Added unit tests for the analytics adapter
Removed an unneeded export of a const that was causing errors with the analytics adapter
Support for non-latin and non-cyrillic symbols
- Brand safety now checks the page URL for bad words. No ad is shown if there is at least one match.
- Repeating code is optimized and moved to helper function
- Multi-language support for brand safety
Sending the needed ad density data to the bidder
Code review changes
Adding support for preroll ads
Video unit test added
@ChrisHuie
Copy link
Collaborator

@wyand-sp this test failure should be fixed in the latest version of master if you want to pull in recent commits

@@ -120,7 +121,7 @@ function brandSafety(badWords, maxScore) {
.replaceAll(/\s\s+/g, ' ')
.toLowerCase()
.trim();
const content = window.top.document.body.innerText.toLowerCase();
const content = window.top.document.body.outerText.toLowerCase();
Copy link
Collaborator

Choose a reason for hiding this comment

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

does textContent not work? that's what we used in 9.0 branch

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood. We've updated the code. Thanks for your comment.

@jsnellbaker jsnellbaker self-requested a review June 3, 2024 15:15
@jsnellbaker jsnellbaker self-assigned this Jun 3, 2024
@patmmccann patmmccann merged commit b3fbd02 into prebid:master Jun 8, 2024
4 checks passed
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.

None yet

7 participants