Skip to content

Commit 309f979

Browse files
EMXDigitalmhaji-cadentEMX-MikeD
authored
Cadent Aperture MX Bid Adapter: support GPP and GPP Section Ids (#10342)
* added gpp support and test cases * code review changes to tests and syntax * cosmetic change --------- Co-authored-by: Murtaza Haji <[email protected]> Co-authored-by: Michael Denton <[email protected]>
1 parent 507b5a0 commit 309f979

File tree

2 files changed

+285
-198
lines changed

2 files changed

+285
-198
lines changed

modules/cadentApertureMXBidAdapter.js

+17
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,22 @@ export const cadentAdapter = {
170170

171171
return cadentData;
172172
},
173+
174+
getGpp: (bidRequest, cadentData) => {
175+
if (bidRequest.gppConsent) {
176+
const {gppString: gpp, applicableSections: gppSid} = bidRequest.gppConsent;
177+
if (cadentData.regs) {
178+
cadentData.regs.gpp = gpp;
179+
cadentData.regs.gpp_sid = gppSid;
180+
} else {
181+
cadentData.regs = {
182+
gpp: gpp,
183+
gpp_sid: gppSid
184+
}
185+
}
186+
}
187+
return cadentData;
188+
},
173189
getSupplyChain: (bidderRequest, cadentData) => {
174190
if (bidderRequest.bids[0] && bidderRequest.bids[0].schain) {
175191
cadentData.source = {
@@ -290,6 +306,7 @@ export const spec = {
290306
};
291307

292308
cadentData = cadentAdapter.getGdpr(bidderRequest, Object.assign({}, cadentData));
309+
cadentData = cadentAdapter.getGpp(bidderRequest, Object.assign({}, cadentData));
293310
cadentData = cadentAdapter.getSupplyChain(bidderRequest, Object.assign({}, cadentData));
294311
if (bidderRequest && bidderRequest.uspConsent) {
295312
cadentData.us_privacy = bidderRequest.uspConsent;

0 commit comments

Comments
 (0)