-
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
PBjs Core (Native): ortb tracker support #8905
PBjs Core (Native): ortb tracker support #8905
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 with a minor styling suggestion; also noting that this must go out before the PUC changes I believe.
src/native.js
Outdated
@@ -305,8 +305,27 @@ export function fireImpressionTrackers(nativeResponse, {runMarkup = (mkup) => in | |||
} | |||
} | |||
|
|||
export function fireClickTrackers(nativeResponse, {fetchURL = triggerPixel} = {}) { | |||
(nativeResponse.link?.clicktrackers || []).forEach(url => fetchURL(url)); | |||
export function fireClickTrackers(nativeResponse, {fetchURL = triggerPixel, assetId} = {}) { |
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 just style, but I'd prefer to either merge params together or keep dependencies separate from inputs (either fireClickTrackers({nativeResponse, assetId, {...dependencies}})
or fireClickTrackers(nativeResponse, assetId, {...dependencies})
look better to me).
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 prefer the first one.
* handle clicktrackers the ORTB way * support for clicktrackers on assets * parameters are now explicitly defined Co-authored-by: Michele Nasti <michele@rtk.io>
* handle clicktrackers the ORTB way * support for clicktrackers on assets * parameters are now explicitly defined Co-authored-by: Michele Nasti <michele@rtk.io>
Type of change
Description of change
Native ORTB spec allows clicktrackers to be defined on individual assets; this PR adds this feature, together with PUC #150.
Other information
Accompaining with prebid/prebid-universal-creative#150