-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support Native #4759
Support Native #4759
Conversation
Make it possible to pass dynamic parameters to adapter
Pass metadata from adapter
Don't think the ci/circleci issue is related to this PR? |
options: bid.params.options | ||
}; | ||
|
||
if (bid.mediaTypes && bid.mediaTypes.banner && bid.mediaTypes.native) { | ||
adRequest.banner = true; |
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.
Why does setting this matter if native
is in the mediaTypes?
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.
It's related to how it works in the backend. It only needs setting if both banner and native is enabled, otherwise (if not native) banner is implied.
Btw. thanks for all the input, I will fix those things for the next PR.
adRequest.banner = true; | ||
} | ||
|
||
if (bid.mediaTypes && bid.mediaTypes.native) { |
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.
I have a personal connection with using the deepAccess
util for these kinds of checks.
if(deepAccess(bid, 'mediaTypes.native')
But definitely not necessary, just like to point it out so people are aware of it!
} | ||
|
||
function getSizes(bid) { | ||
if (typeof utils.deepAccess(bid, 'mediaTypes.banner.sizes') !== 'undefined') { |
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.
I see you already are using deepAccess! nice :)
Can probably be changed to leave off the typeof {} !== 'undefined'
maybe?
Since if it was not defined it will just return undefined
which is falsely.
No big deal though.
* Livewrapped bid and analytics adapter * Fixed some tests for browser compatibility * Fixed some tests for browser compatibility * Changed analytics adapter code name * Fix double quote in debug message * modified how gdpr is being passed * Added support for Publisher Common ID Module * Corrections for ttr in analytics * ANalytics updates * Auction start time stamp changed * Detect recovered ad blocked requests Make it possible to pass dynamic parameters to adapter * Collect info on ad units receiving any valid bid * Support for ID5 Pass metadata from adapter * Typo in test + eids on wrong level * Fix for Prebid 3.0 * Fix get referer * http -> https in tests * Native support * Read sizes from mediatype.banner * Revert accidental commit
Type of change
Description of change
Support native ads + get banner size from mediaTypes.banner