Skip to content
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

Gumgum Bid Adapter: add gvlid, remove digitrust #9779

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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