-
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
Send placeholders for configured native assets #3573
Conversation
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.
LGTM
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.
Largely LGTM; just made a note about the new field name in the native mediaTypes.
Also we need to get the docs changes put together.
src/native.js
Outdated
@@ -163,10 +163,41 @@ export function getNativeTargeting(bid) { | |||
value = value.url; | |||
} | |||
|
|||
const sendPlaceholder = deepAccess( | |||
bidReq, | |||
`mediaTypes.native.${asset}.usePlaceholder` |
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.
Any new thoughts on the name for this property? I know we were throwing other ideas around in a different discussion.
cc @mkendall07
yeah good call on docs. @matthewlane can you get the doc PR up today? |
Docs PR: prebid/prebid.github.io#1175 |
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.
LGTM
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.
LGTM
Type of change
Description of change
Transmitting some types of native assets via querystring parameters can cause issues. For example, large strings may exceed an adserver's url call limit, and special characters can get mangled. This PR introduces a configuration option to send placeholder values in adserver targeting, instead of asset values. The native creative template can then replace the placeholder values with the actual values through a postmessage request to Prebid (a PR to the native functionality in prebid-universal-creative will do this automatically).
Given the configuration:
The
body
andclickUrl
assets will be sent as placeholder valueshb_native_body:<adId>
andhb_native_linkurl:<adId>
. All other native assets will be sent normally.