-
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
update quantcastBidAdapter to pass quantcast fpa in the bid request #5947
Changes from 2 commits
36f0acf
aa1bbf8
e84fd54
f0466fc
0bd1bfe
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import * as utils from '../src/utils.js'; | ||
import { ajax } from '../src/ajax.js'; | ||
import { config } from '../src/config.js'; | ||
import { getStorageManager } from '../src/storageManager.js'; | ||
import { registerBidder } from '../src/adapters/bidderFactory.js'; | ||
import find from 'core-js-pure/features/array/find.js'; | ||
|
||
|
@@ -18,6 +19,9 @@ export const QUANTCAST_TEST_PUBLISHER = 'test-publisher'; | |
export const QUANTCAST_TTL = 4; | ||
export const QUANTCAST_PROTOCOL = 'https'; | ||
export const QUANTCAST_PORT = '8443'; | ||
export const QUANTCAST_FPA = '__qca'; | ||
|
||
export const storage = getStorageManager(); | ||
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. Does Quantcast have a registered GVL id? Passing the following will allow storage access when GDPR Enforcement is enabled. 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. We do. I updated the code accordingly. Thanks for the catch. |
||
|
||
function makeVideoImp(bid) { | ||
const video = {}; | ||
|
@@ -101,6 +105,11 @@ function checkTCFv2(tcData) { | |
return !!(vendorConsent && purposeConsent); | ||
} | ||
|
||
function getQuantcastFPA() { | ||
let fpa = storage.getCookie(QUANTCAST_FPA) | ||
return fpa || '' | ||
} | ||
|
||
/** | ||
* The documentation for Prebid.js Adapter 1.0 can be found at link below, | ||
* http://prebid.org/dev-docs/bidder-adapter-1.html | ||
|
@@ -188,7 +197,8 @@ export const spec = { | |
uspSignal: uspConsent ? 1 : 0, | ||
uspConsent, | ||
coppa: config.getConfig('coppa') === true ? 1 : 0, | ||
prebidJsVersion: '$prebid.version$' | ||
prebidJsVersion: '$prebid.version$', | ||
fpa: getQuantcastFPA() | ||
}; | ||
|
||
const data = JSON.stringify(requestData); | ||
|
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.
Build was complaining about this line, so I removed it:
"/home/circleci/Prebid.js/modules/lunamediahbBidAdapter.js
73:1 error Trailing spaces not allowed no-trailing-spaces"