-
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
Concert Bid Adapter: adding referer (Resubmit of Pr #8580) #8676
Changes from 2 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { logWarn, logMessage, debugTurnedOn, generateUUID } from '../src/utils.js'; | ||
import { registerBidder } from '../src/adapters/bidderFactory.js'; | ||
import { getStorageManager } from '../src/storageManager.js' | ||
import { getStorageManager } from '../src/storageManager.js'; | ||
|
||
const BIDDER_CODE = 'concert'; | ||
const CONCERT_ENDPOINT = 'https://bids.concert.io'; | ||
|
@@ -45,7 +45,7 @@ export const spec = { | |
uspConsent: bidderRequest.uspConsent, | ||
gdprConsent: bidderRequest.gdprConsent | ||
} | ||
} | ||
}; | ||
|
||
payload.slots = validBidRequests.map(bidRequest => { | ||
let slot = { | ||
|
@@ -57,8 +57,9 @@ export const spec = { | |
slotType: bidRequest.params.slotType, | ||
adSlot: bidRequest.params.slot || bidRequest.adUnitCode, | ||
placementId: bidRequest.params.placementId || '', | ||
site: bidRequest.params.site || bidderRequest.refererInfo.page | ||
} | ||
site: bidRequest.params.site || bidderRequest.refererInfo.page, | ||
ref: bidderRequest.refererInfo.ref | ||
}; | ||
|
||
return slot; | ||
}); | ||
|
@@ -69,7 +70,7 @@ export const spec = { | |
method: 'POST', | ||
url: `${CONCERT_ENDPOINT}/bids/prebid`, | ||
data: JSON.stringify(payload) | ||
} | ||
}; | ||
}, | ||
/** | ||
* Unpack the response from the server into a list of bids. | ||
|
@@ -101,7 +102,7 @@ export const spec = { | |
creativeId: bid.creativeId, | ||
netRevenue: bid.netRevenue, | ||
currency: bid.currency | ||
} | ||
}; | ||
}); | ||
|
||
if (debugTurnedOn() && serverBody.debug) { | ||
|
@@ -122,7 +123,7 @@ export const spec = { | |
* @return {UserSync[]} The user syncs which should be dropped. | ||
*/ | ||
getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent) { | ||
const syncs = [] | ||
const syncs = []; | ||
if (syncOptions.iframeEnabled && !hasOptedOutOfPersonalization()) { | ||
let params = []; | ||
|
||
|
@@ -203,9 +204,8 @@ function hasOptedOutOfPersonalization() { | |
* @param {BidderRequest} bidderRequest Object which contains any data consent signals | ||
*/ | ||
function consentAllowsPpid(bidderRequest) { | ||
/* NOTE: We cannot easily test GDPR consent, without the | ||
/* NOTE: We can't easily test GDPR consent, without the | ||
* `consent-string` npm module; so will have to rely on that | ||
* happening on the bid-server. */ | ||
return !(bidderRequest.uspConsent === 'string' && | ||
bidderRequest.uspConsent.toUpperCase().substring(0, 2) === '1YY') | ||
return !(bidderRequest.uspConsent === 'string' && bidderRequest.uspConsent.toUpperCase().substring(0, 2) === '1YY'); | ||
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 are you checking for the second character https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/f8d659f58665b4e797b99b59079fd787a386eaaa/CCPA/US%20Privacy%20String.md?plain=1#L123 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. This is checking the first 3 characters of the string; we do not mark as consenting to PPID usage unless: (1) USPrivacy string version matches what we expect, and (2) both (Also, similarly to below: this line only shows in the diff because it looks like our linter took out the line-break; nothing consequential was changed.) 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. If the string is '1YY' or '1NY', the user is opted out 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. If I understand what you're saying, we should consider the user "opted-out" if the CCPA string starts 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. some people have started pushing '1NY' if the GPC headers in the browser indicate opt out. |
||
} |
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.
what does this comment mean? why can't you look at the tcf consent string without this npm module?
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 can view the consent string, yes, but if parsing it is non-trivial enough that there exists an official, specialised, and sanctioned
npm
module to do it, it does not seem appropriate that we would try to add that functionality ourselves to our bid adapter; especially since we do that exact step (usingconsent-string
) in our bid server.(For the record, this change only exists in this PR because it was a
NOP
commit, to try to activate the CircleCI on a fresh push.)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 provide a utility function, eg
Prebid.js/modules/appnexusBidAdapter.js
Line 559 in 0be4560
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.
fwiw, this is not a change request, just trying to be helpful
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.
I appreciate this, @patmmccann , thank you! (I don't think those functions existed when we first wrote our adapter, so it's good to know that so we can update it.) I've updated our use of consent strings, as per these comments, and will ask Chris if they can merge these changes to this branch (which I can't do). 🙌