Skip to content

Commit

Permalink
Triplelift Bid Adapter: relax check on consentString before appending…
Browse files Browse the repository at this point in the history
… gdprApplies to usersyncs (#9885)

* TL-35335: Cast playbackmethod as array

* TL-36204: Copy tid to imp extension obj

* Added support for entire ortb2Imp obj

* Only setting what exists in ortb2Imp.ext

* Added additional test to check copy of entire ext obj

* Revert "TL-36204: Copy tid to imp extension object"

* TL-36204: Copying ortb2Imp.ext to impression ext obj

* Added edge case logic and additional test

* recos for tid change

* Added spread operator to replace deepClone

* addresses gdprApplies

---------

Co-authored-by: Patrick Loughrey <ploughrey@triplelift.com>
  • Loading branch information
nllerandi3lift and patrickloughrey committed May 1, 2023
1 parent 7d61a53 commit cb2536b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/tripleliftBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const BIDDER_CODE = 'triplelift';
const STR_ENDPOINT = 'https://tlx.3lift.com/header/auction?';
const BANNER_TIME_TO_LIVE = 300;
const VIDEO_TIME_TO_LIVE = 3600;
let gdprApplies = true;
let gdprApplies = null;
let consentString = null;
export const storage = getStorageManager({bidderCode: BIDDER_CODE});

Expand Down Expand Up @@ -40,8 +40,12 @@ export const tripleliftAdapterSpec = {
if (bidderRequest && bidderRequest.gdprConsent) {
if (typeof bidderRequest.gdprConsent.gdprApplies !== 'undefined') {
gdprApplies = bidderRequest.gdprConsent.gdprApplies;
tlCall = tryAppendQueryString(tlCall, 'gdpr', gdprApplies.toString());
} else {
gdprApplies = true;
}

tlCall = tryAppendQueryString(tlCall, 'gdpr', gdprApplies.toString());

if (typeof bidderRequest.gdprConsent.consentString !== 'undefined') {
consentString = bidderRequest.gdprConsent.consentString;
tlCall = tryAppendQueryString(tlCall, 'cmp_cs', consentString);
Expand Down Expand Up @@ -87,7 +91,7 @@ export const tripleliftAdapterSpec = {
syncEndpoint = tryAppendQueryString(syncEndpoint, 'src', 'prebid');
}

if (consentString !== null) {
if (consentString !== null || gdprApplies) {
syncEndpoint = tryAppendQueryString(syncEndpoint, 'gdpr', gdprApplies);
syncEndpoint = tryAppendQueryString(syncEndpoint, 'cmp_cs', consentString);
}
Expand Down

0 comments on commit cb2536b

Please sign in to comment.