-
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
LiveIntent UserId Module: add IP and User Agent Configuration Parameters #12402
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import { submodule } from '../../src/hook.js'; | |
import { LiveConnect } from 'live-connect-js'; // eslint-disable-line prebid/validate-imports | ||
import { getStorageManager } from '../../src/storageManager.js'; | ||
import { MODULE_TYPE_UID } from '../../src/activities/modules.js'; | ||
import { DEFAULT_AJAX_TIMEOUT, MODULE_NAME, composeIdObject, eids, GVLID, DEFAULT_DELAY, PRIMARY_IDS, parseRequestedAttributes } from './shared.js' | ||
import { DEFAULT_AJAX_TIMEOUT, MODULE_NAME, composeIdObject, eids, GVLID, DEFAULT_DELAY, PRIMARY_IDS, parseRequestedAttributes, makeSourceEventToSend } from './shared.js' | ||
|
||
/** | ||
* @typedef {import('../modules/userId/index.js').Submodule} Submodule | ||
|
@@ -23,7 +23,7 @@ const EVENTS_TOPIC = 'pre_lips'; | |
|
||
export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: MODULE_NAME}); | ||
const calls = { | ||
ajaxGet: (url, onSuccess, onError, timeout) => { | ||
ajaxGet: (url, onSuccess, onError, timeout, headers) => { | ||
ajaxBuilder(timeout)( | ||
url, | ||
{ | ||
|
@@ -33,7 +33,8 @@ const calls = { | |
undefined, | ||
{ | ||
method: 'GET', | ||
withCredentials: true | ||
withCredentials: true, | ||
customHeaders: headers | ||
} | ||
) | ||
}, | ||
|
@@ -92,7 +93,11 @@ function initializeLiveConnect(configParams) { | |
const publisherId = configParams.publisherId || 'any'; | ||
const identityResolutionConfig = { | ||
publisherId: publisherId, | ||
requestedAttributes: parseRequestedAttributes(configParams.requestedAttributesOverrides) | ||
requestedAttributes: parseRequestedAttributes(configParams.requestedAttributesOverrides), | ||
extraAttributes: { | ||
ipv4: configParams.ipv4, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why make these config params instead of just gathering from where the publisher already set them? in ortb2.device.ip and ipv6? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will get back to you There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @patmmccann, |
||
ipv6: configParams.ipv6 | ||
} | ||
}; | ||
if (configParams.url) { | ||
identityResolutionConfig.url = configParams.url; | ||
|
@@ -136,8 +141,10 @@ function initializeLiveConnect(configParams) { | |
// The second param is the storage object, LS & Cookie manipulation uses PBJS. | ||
// The third param is the ajax and pixel object, the AJAX and pixel use PBJS. | ||
liveConnect = liveIntentIdSubmodule.getInitializer()(liveConnectConfig, storage, calls); | ||
if (configParams.emailHash) { | ||
liveConnect.push({ hash: configParams.emailHash }); | ||
|
||
const sourceEvent = makeSourceEventToSend(configParams) | ||
if (sourceEvent != null) { | ||
liveConnect.push(sourceEvent); | ||
} | ||
return liveConnect; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
please drop your modifications to this from your commit
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.
Reverted it. Thank you.