diff --git a/modules/eskimiBidAdapter.js b/modules/eskimiBidAdapter.js index dd3f634462d..36feda03ec1 100644 --- a/modules/eskimiBidAdapter.js +++ b/modules/eskimiBidAdapter.js @@ -3,7 +3,6 @@ import {registerBidder} from '../src/adapters/bidderFactory.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; import * as utils from '../src/utils.js'; import {getBidIdParameter, logInfo, mergeDeep} from '../src/utils.js'; -import {hasPurpose1Consent} from '../src/utils/gdpr.js'; /** * @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest @@ -47,7 +46,6 @@ const REGION_SUBDOMAIN_SUFFIX = { export const spec = { code: BIDDER_CODE, - aliases: ['eskimi'], gvlid: GVLID, supportedMediaTypes: [BANNER, VIDEO], isBidRequestValid, @@ -120,7 +118,7 @@ function isBidRequestValid(bidRequest) { } function isPlacementIdValid(bidRequest) { - return utils.isNumber(bidRequest.params.placementId); + return !!parseInt(bidRequest.params.placementId); } function isValidBannerRequest(bidRequest) { @@ -215,7 +213,7 @@ function createRequest(bidRequests, bidderRequest, mediaType) { const bid = bidRequests.find((b) => b.params.placementId) if (!data.site) data.site = {} - data.site.ext = {placementId: bid.params.placementId} + data.site.ext = {placementId: parseInt(bid.params.placementId)} if (bidderRequest.gdprConsent) { if (!data.user) data.user = {}; @@ -255,46 +253,31 @@ function isBannerBid(bid) { * @return {{type: (string), url: (*|string)}[]} */ function getUserSyncs(syncOptions, responses, gdprConsent, uspConsent, gppConsent) { - if ((syncOptions.iframeEnabled || syncOptions.pixelEnabled) && hasSyncConsent(gdprConsent, uspConsent, gppConsent)) { + if ((syncOptions.iframeEnabled || syncOptions.pixelEnabled)) { let pixelType = syncOptions.iframeEnabled ? 'iframe' : 'image'; let query = []; let syncUrl = getUserSyncUrlByRegion(); - // Attaching GDPR Consent Params in UserSync url + // GDPR Consent Params in UserSync url if (gdprConsent) { query.push('gdpr=' + (gdprConsent.gdprApplies & 1)); query.push('gdpr_consent=' + encodeURIComponent(gdprConsent.consentString || '')); } - // CCPA + // US Privacy Consent if (uspConsent) { query.push('us_privacy=' + encodeURIComponent(uspConsent)); } - // GPP Consent + // Global Privacy Platform Consent if (gppConsent?.gppString && gppConsent?.applicableSections?.length) { query.push('gpp=' + encodeURIComponent(gppConsent.gppString)); query.push('gpp_sid=' + encodeURIComponent(gppConsent.applicableSections.join(','))); } return [{ type: pixelType, - url: `${syncUrl}${query.length > 0 ? '?' + query.join('&') : ''}` + url: `${syncUrl}${query.length > 0 ? '&' + query.join('&') : ''}` }]; } } -function hasSyncConsent(gdprConsent, uspConsent, gppConsent) { - return hasPurpose1Consent(gdprConsent) && hasUspConsent(uspConsent) && hasGppConsent(gppConsent); -} - -function hasUspConsent(uspConsent) { - return typeof uspConsent !== 'string' || !(uspConsent[0] === '1' && uspConsent[2] === 'Y'); -} - -function hasGppConsent(gppConsent) { - return ( - !(gppConsent && Array.isArray(gppConsent.applicableSections)) || - gppConsent.applicableSections.every((section) => typeof section === 'number' && section <= 5) - ); -} - /** * Get Bid Request endpoint url by region * @return {string}