Skip to content

Commit

Permalink
Adnuntius Bid Adapter: Europe endpoint (prebid#9829)
Browse files Browse the repository at this point in the history
* Adnuntius Bid Adapter: Route traffic to euro-servers if GDPR applies.

* Tests Added to gdpr applies.
  • Loading branch information
mikael-lundin authored and jorgeluisrocha committed May 18, 2023
1 parent 8943612 commit 3650560
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modules/adnuntiusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { getStorageManager } from '../src/storageManager.js';

const BIDDER_CODE = 'adnuntius';
const ENDPOINT_URL = 'https://ads.adnuntius.delivery/i';
const ENDPOINT_URL_EUROPE = 'https://europe.delivery.adnuntius.com/i';
const GVLID = 855;
const DEFAULT_VAST_VERSION = 'vast4'
// const DEFAULT_NATIVE = 'native'
Expand Down Expand Up @@ -130,10 +131,11 @@ export const spec = {
const network = networkKeys[j];
const networkRequest = [...request]
if (network.indexOf('_video') > -1) { networkRequest.push('tt=' + DEFAULT_VAST_VERSION) }
const requestURL = gdprApplies ? ENDPOINT_URL_EUROPE : ENDPOINT_URL
// if (network.indexOf('_native') > -1) { networkRequest.push('tt=' + DEFAULT_NATIVE) }
requests.push({
method: 'POST',
url: ENDPOINT_URL + '?' + networkRequest.join('&'),
url: requestURL + '?' + networkRequest.join('&'),
data: JSON.stringify(networks[network]),
bid: bidRequests[network]
});
Expand Down
3 changes: 2 additions & 1 deletion test/spec/modules/adnuntiusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { getStorageManager } from 'src/storageManager.js';

describe('adnuntiusBidAdapter', function () {
const URL = 'https://ads.adnuntius.delivery/i?tzo=';
const EURO_URL = 'https://europe.delivery.adnuntius.com/i?tzo=';
const GVLID = 855;
const usi = utils.generateUUID()
const meta = [{ key: 'usi', value: usi }]
Expand Down Expand Up @@ -35,7 +36,7 @@ describe('adnuntiusBidAdapter', function () {
const ENDPOINT_URL_VIDEO = `${URL}${tzo}&format=json&userId=${usi}&tt=vast4`;
const ENDPOINT_URL_NOCOOKIE = `${URL}${tzo}&format=json&userId=${usi}&noCookies=true`;
const ENDPOINT_URL_SEGMENTS = `${URL}${tzo}&format=json&segments=segment1,segment2,segment3&userId=${usi}`;
const ENDPOINT_URL_CONSENT = `${URL}${tzo}&format=json&consentString=consentString&userId=${usi}`;
const ENDPOINT_URL_CONSENT = `${EURO_URL}${tzo}&format=json&consentString=consentString&userId=${usi}`;
const adapter = newBidder(spec);

const bidderRequests = [
Expand Down

0 comments on commit 3650560

Please sign in to comment.