-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
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 unit tests for the analytics adapter
Removed an unneeded export of a const that was causing errors with the analytics adapter
Adding support for compound words as well as combo-patterns.
* Adding the options to read and write recent ads from the local storage when enabled. * Using outerText for whole page text selection.
@wyand-sp this test failure should be fixed in the latest version of master if you want to pull in recent commits |
modules/adhashBidAdapter.js
Outdated
@@ -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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://kellegous.com/j/2013/01/26/layout-performance/ outerText just as bad
There was a problem hiding this comment.
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.
Using textContent to get the raw text from the body.
Changing the recent ads calculations to the latest supported version.
Removed the usage of body.innerText
Type of change
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