Skip to content

Commit

Permalink
Update gumgumBidAdapter.js (prebid#9779)
Browse files Browse the repository at this point in the history
  • Loading branch information
patmmccann authored and jorgeluisrocha committed May 18, 2023
1 parent e715105 commit 2b7e2f2
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions modules/gumgumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {getStorageManager} from '../src/storageManager.js';
import {includes} from '../src/polyfill.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'gumgum'
const BIDDER_CODE = 'gumgum';
const storage = getStorageManager({bidderCode: BIDDER_CODE});
const ALIAS_BIDDER_CODE = ['gg']
const BID_ENDPOINT = `https://g2.gumgum.com/hbid/imp`
const ALIAS_BIDDER_CODE = ['gg'];
const BID_ENDPOINT = `https://g2.gumgum.com/hbid/imp`;
const JCSI = { t: 0, rq: 8, pbv: '$prebid.version$' }
const SUPPORTED_MEDIA_TYPES = [BANNER, VIDEO]
const TIME_TO_LIVE = 60
const SUPPORTED_MEDIA_TYPES = [BANNER, VIDEO];
const TIME_TO_LIVE = 60;
const DELAY_REQUEST_TIME = 1800000; // setting to 30 mins

let invalidRequestIds = {};
Expand Down Expand Up @@ -99,17 +99,6 @@ function getWrapperCode(wrapper, data) {
return wrapper.replace('AD_JSON', window.btoa(JSON.stringify(data)))
}

function _getDigiTrustQueryParams(userId) {
let digiTrustId = userId.digitrustid && userId.digitrustid.data;
// Verify there is an ID and this user has not opted out
if (!digiTrustId || (digiTrustId.privacy && digiTrustId.privacy.optout)) {
return {};
}
return {
dt: digiTrustId.id
};
}

/**
* Serializes the supply chain object according to IAB standards
* @see https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/supplychainobject.md
Expand Down Expand Up @@ -416,7 +405,7 @@ function buildRequests(validBidRequests, bidderRequest) {
sizes,
url: BID_ENDPOINT,
method: 'GET',
data: Object.assign(data, _getBrowserParams(topWindowUrl), _getDigiTrustQueryParams(userId))
data: Object.assign(data, _getBrowserParams(topWindowUrl))
});
});
return bids;
Expand Down Expand Up @@ -596,6 +585,7 @@ function getUserSyncs(syncOptions, serverResponses) {

export const spec = {
code: BIDDER_CODE,
gvlid: 61,
aliases: ALIAS_BIDDER_CODE,
isBidRequestValid,
buildRequests,
Expand Down

0 comments on commit 2b7e2f2

Please sign in to comment.