-
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
Add referer detection module #3067
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.
See question/point below
src/refererDetection.js
Outdated
location: null, | ||
isTop: (currentWindow == win.top) | ||
}); | ||
logError('Error while accessing cross domain iframe.', e); |
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 this need to be a logError
? Based on my testing in a cross domain testpage in Chrome, the data still gets collected (due to available information in ancestor) but it also displays this error.
Should it be a warning instead perhaps?
src/refererDetection.js
Outdated
stack: stackInfo.stack, | ||
}; | ||
} catch (e) { | ||
logError('Error while getting referer info', e); |
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.
we probably don't need to log any errors from this module since it doesn't alter any behavior if something breaks. Bump down to warn or message.
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 - just needs a jsdoc for return object.
* add referere detection module * dont log all errors on console * Update message * Add jsdoc
* add referere detection module * dont log all errors on console * Update message * Add jsdoc
* add referere detection module * dont log all errors on console * Update message * Add jsdoc
* add referere detection module * dont log all errors on console * Update message * Add jsdoc
* add referere detection module * dont log all errors on console * Update message * Add jsdoc
Type of change
Description of change
This PR adds referer detection module to prebid core. New property
refererInfo
is added to bidderRequest object.Following details will be available to each bidder
All bidders can access this info in buildRequests spec.
We will be deprecating
utils.getTopWindowLocation
andutils.getTopFrameReferrer
soon.