Skip to content
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

TCFv2.0 Purpose 7 #5444

Merged
merged 34 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3042c1c
TCF v2.0 enforcement
Fawke Apr 30, 2020
73d3b52
test/spec/modules/gdprEnforcement_spec.js
Fawke Apr 30, 2020
a49f7e1
add check for gdpr version
Fawke May 5, 2020
559724e
add logInfo message
Fawke May 5, 2020
d945a8a
remove comment and store value of PURPOSES in an object
Fawke May 7, 2020
06e46d2
add gvlid check
Fawke May 11, 2020
f1fcf31
merge with master - change in validateRules function
Fawke May 28, 2020
cc57db8
add unit tests for validateRules function
Fawke Jun 2, 2020
9b98e98
remove purposeId parameter from validateRules function
Fawke Jun 2, 2020
87cfe20
merge with master
Fawke Jun 4, 2020
859d782
add extra tests
Fawke Jun 4, 2020
4e3978c
merge with master
Fawke Jun 4, 2020
1a0f5a7
make failing unit test case pass
Fawke Jun 4, 2020
ae9a237
deprecate allowAuctionWithouConsent with tcf 2 workflow
Fawke Jun 5, 2020
82e80a8
add extra checks for defaults
Fawke Jun 5, 2020
5311bac
remove tcf 2 test page
Fawke Jun 5, 2020
358a556
add strict gvlid check
Fawke Jun 8, 2020
d584a35
add comments and shorten log messages
Fawke Jun 9, 2020
0b461fb
shorted log messages
Fawke Jun 9, 2020
32c0682
add unit tests for setEnforcementConfig
Fawke Jun 9, 2020
35a6729
Merge remote-tracking branch 'origin/prebid-4.0' into tcf-purpose2
Jun 13, 2020
e7f14c0
add gvlid for alias and gvlMapping support
Jun 15, 2020
d0abaf0
remove gvlid check
Fawke Jun 15, 2020
45e9fb6
add support to add gvlid for aliases
Jun 17, 2020
beb7b65
Merge branch 'tcf-purpose2' of github.com:prebid/Prebid.js into tcf-p…
Jun 17, 2020
f95e876
add enableAnalytics hook
Fawke Jun 23, 2020
7700d42
purpose 7 implementation: 1.hook added 2.new field to set gvlid for a…
Fawke Jul 1, 2020
abf357b
add enableAnalytics hook
Fawke Jul 6, 2020
e683df6
emit tcf2 events
Fawke Jul 7, 2020
ee932d5
fix regression
Fawke Jul 7, 2020
ee60177
modify mechanism of event emitted after auction end
Fawke Jul 8, 2020
1c99028
add unit test for enableAnalyticsHook
Fawke Jul 8, 2020
d2e5311
merge with master
Fawke Aug 10, 2020
02fa662
add unit test for auction end event
Fawke Aug 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/appnexusAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var appnexusAdapter = adapter({

adapterManager.registerAnalyticsAdapter({
adapter: appnexusAdapter,
code: 'appnexus'
code: 'appnexus',
gvlid: 32
});

export default appnexusAdapter;
15 changes: 14 additions & 1 deletion modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,20 @@ const storage = getStorageManager(GVLID, BIDDER_CODE);
export const spec = {
code: BIDDER_CODE,
gvlid: GVLID,
aliases: ['appnexusAst', 'brealtime', 'emxdigital', 'pagescience', 'defymedia', 'gourmetads', 'matomy', 'featureforward', 'oftmedia', 'districtm', 'adasta', 'beintoo'],
aliases: [
{ code: 'appnexusAst', gvlid: 32 },
{ code: 'brealtime' },
{ code: 'emxdigital', gvlid: 183 },
{ code: 'pagescience' },
{ code: 'defymedia' },
{ code: 'gourmetads' },
{ code: 'matomy' },
{ code: 'featureforward' },
{ code: 'oftmedia' },
{ code: 'districtm', gvlid: 144 },
{ code: 'adasta' },
{ code: 'beintoo', gvlid: 618 },
],
supportedMediaTypes: [BANNER, VIDEO, NATIVE],

/**
Expand Down
24 changes: 16 additions & 8 deletions modules/consentManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ const DEFAULT_CMP = 'iab';
const DEFAULT_CONSENT_TIMEOUT = 10000;
const DEFAULT_ALLOW_AUCTION_WO_CONSENT = true;

export const allowAuction = {
value: DEFAULT_ALLOW_AUCTION_WO_CONSENT,
definedInConfig: false
}
export let userCMP;
export let consentTimeout;
export let allowAuction;
export let gdprScope;
export let staticConsentData;

Expand Down Expand Up @@ -322,6 +325,13 @@ function processCmpData(consentObject, hookConfig) {
// determine which set of checks to run based on cmpVersion
let checkFn = (cmpVersion === 1) ? checkV1Data : (cmpVersion === 2) ? checkV2Data : null;

// Raise deprecation warning if 'allowAuctionWithoutConsent' is used with TCF 2.
if (allowAuction.definedInConfig && cmpVersion === 2) {
utils.logWarn(`'allowAuctionWithoutConsent' ignored for TCF 2`);
} else if (!allowAuction.definedInConfig && cmpVersion === 1) {
utils.logInfo(`'allowAuctionWithoutConsent' using system default: (${DEFAULT_ALLOW_AUCTION_WO_CONSENT}).`);
}

if (utils.isFn(checkFn)) {
if (checkFn(consentObject)) {
cmpFailed(`CMP returned unexpected value during lookup process.`, hookConfig, consentObject);
Expand Down Expand Up @@ -352,7 +362,7 @@ function cmpFailed(errMsg, hookConfig, extraArgs) {
clearTimeout(hookConfig.timer);

// still set the consentData to undefined when there is a problem as per config options
if (allowAuction) {
if (allowAuction.value && cmpVersion === 1) {
storeConsentData(undefined);
}
exitModule(errMsg, hookConfig, extraArgs);
Expand Down Expand Up @@ -406,8 +416,8 @@ function exitModule(errMsg, hookConfig, extraArgs) {
let nextFn = hookConfig.nextFn;

if (errMsg) {
if (allowAuction) {
utils.logWarn(errMsg + ' Resuming auction without consent data as per consentManagement config.', extraArgs);
if (allowAuction.value && cmpVersion === 1) {
utils.logWarn(errMsg + ` 'allowAuctionWithoutConsent' activated.`, extraArgs);
nextFn.apply(context, args);
} else {
utils.logError(errMsg + ' Canceling auction as per consentManagement config.', extraArgs);
Expand Down Expand Up @@ -460,10 +470,8 @@ export function setConsentConfig(config) {
}

if (typeof config.allowAuctionWithoutConsent === 'boolean') {
allowAuction = config.allowAuctionWithoutConsent;
} else {
allowAuction = DEFAULT_ALLOW_AUCTION_WO_CONSENT;
utils.logInfo(`consentManagement config did not specify allowAuctionWithoutConsent. Using system default setting (${DEFAULT_ALLOW_AUCTION_WO_CONSENT}).`);
allowAuction.value = config.allowAuctionWithoutConsent;
allowAuction.definedInConfig = true;
}

// if true, then gdprApplies should be set to true
Expand Down
Loading