-
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
New PubProvided Id UserId Submodule #5767
Merged
Merged
Changes from 3 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
b2eeeeb
PubProvided Module
MarkoYerkovichRP cda2b86
-
MarkoYerkovichRP 93b8468
formatting
MarkoYerkovichRP 3008291
formatting
MarkoYerkovichRP d51ee5c
Added rubiconBidAdapter support
MarkoYerkovichRP 1a0fe24
formatting
MarkoYerkovichRP 286a90f
Merge branch 'master' into pubProvided
MarkoYerkovichRP 546e331
formatting
MarkoYerkovichRP 974fbba
formatting
MarkoYerkovichRP 983317f
formatting
MarkoYerkovichRP f0a230c
commit to rerun build
MarkoYerkovichRP af408b0
type changes
MarkoYerkovichRP 3dd1b99
type changes
MarkoYerkovichRP 114005a
type changes
MarkoYerkovichRP 9f7a32c
Revert "type changes"
MarkoYerkovichRP e488edb
Revert "type changes"
MarkoYerkovichRP 5d0b2c1
formatting
MarkoYerkovichRP b296b2e
formatting
MarkoYerkovichRP bce5b25
formatting
MarkoYerkovichRP a02bd15
formatting
MarkoYerkovichRP 6339bb0
formatting
MarkoYerkovichRP 2e0f6d8
Revert "type changes"
MarkoYerkovichRP 476519b
formatting
MarkoYerkovichRP c7818f6
formatting
MarkoYerkovichRP 7c60c34
formatting
MarkoYerkovichRP 8d36ae8
formatting
MarkoYerkovichRP 597e4c0
commit to rerun build
MarkoYerkovichRP 24b571d
commit to rerun build
MarkoYerkovichRP 9a0583d
commit to rerun build
MarkoYerkovichRP f4cf127
rubiconBidAdapter changes
MarkoYerkovichRP 6c9d5b5
Merge branch 'upstream' into pubProvided
MarkoYerkovichRP e6fd58f
rubiconBidAdapter changes
MarkoYerkovichRP 76185b2
rubiconBidAdapter changes
MarkoYerkovichRP 91b3106
trigger build
MarkoYerkovichRP 2253c92
fix
MarkoYerkovichRP 59f8356
fix
MarkoYerkovichRP f67e018
fix
MarkoYerkovichRP 6605e58
rebuild
MarkoYerkovichRP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* This module adds Publisher Provided ids support to the User ID module | ||
* The {@link module:modules/userId} module is required. | ||
* @module modules/pubProvidedSystem | ||
* @requires module:modules/userId | ||
*/ | ||
|
||
import {submodule} from '../src/hook.js'; | ||
import * as utils from "../src/utils"; | ||
|
||
const MODULE_NAME = 'pubProvided'; | ||
|
||
/** @type {Submodule} */ | ||
export const pubProvidedSubmodule = { | ||
/** | ||
* used to link submodule with config | ||
* @type {string} | ||
*/ | ||
name: MODULE_NAME, | ||
|
||
/** | ||
* decode the stored id value for passing to bid request | ||
* @function | ||
* @param {string} value | ||
* @returns {{pubProvided: array}} or undefined if value doesn't exists | ||
*/ | ||
decode(value) { | ||
const res = value ? {pubProvided: value} : undefined; | ||
utils.logInfo('PubProvided: Decoded value ' + JSON.stringify(res)); | ||
return res; | ||
}, | ||
|
||
/** | ||
* performs action to obtain id and return a value. | ||
* @function | ||
* @param {SubmoduleParams} [configParams] | ||
* @returns {{id: array}} | ||
*/ | ||
getId(configParams) { | ||
let res = []; | ||
smenzer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (Array.isArray(configParams.eids)) { | ||
YerkovichM marked this conversation as resolved.
Show resolved
Hide resolved
|
||
res = res.concat(configParams.eids); | ||
} | ||
if (typeof configParams.eidsFunction === 'function') { | ||
res = res.concat(configParams.eidsFunction()); | ||
} | ||
return {id: res}; | ||
jdwieland8282 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
}; | ||
|
||
// Register submodule for userId | ||
submodule('userId', pubProvidedSubmodule); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we chance "pubProvided" to "pubProvidedId", that matches the convention the other id vendors are using.