Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 7 additions & 6 deletions modules/imdsBidAdapter.js → modules/advertisingBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const BLOCKED_AD_SIZES = [
];
const DEFAULT_MAX_TTL = 420; // 7 minutes
export const spec = {
code: 'imds',
code: 'advertising',
aliases: [
{ code: 'synacormedia' }
{ code: 'synacormedia' },
{ code: 'imds' }
],
supportedMediaTypes: [ BANNER, VIDEO ],
sizeMap: {},
Expand Down Expand Up @@ -68,15 +69,15 @@ export const spec = {

validBidReqs.forEach((bid, i) => {
if (seatId && seatId !== bid.params.seatId) {
logWarn(`IMDS: there is an inconsistent seatId: ${bid.params.seatId} but only sending bid requests for ${seatId}, you should double check your configuration`);
logWarn(`Advertising.com: there is an inconsistent seatId: ${bid.params.seatId} but only sending bid requests for ${seatId}, you should double check your configuration`);
return;
} else {
seatId = bid.params.seatId;
}
const tagIdOrPlacementId = bid.params.tagId || bid.params.placementId;
let pos = parseInt(bid.params.pos || deepAccess(bid.mediaTypes, 'video.pos'), 10);
if (isNaN(pos)) {
logWarn(`IMDS: there is an invalid POS: ${bid.params.pos}`);
logWarn(`Advertising.com: there is an invalid POS: ${bid.params.pos}`);
pos = 0;
}
const videoOrBannerKey = this.isVideoBid(bid) ? 'video' : 'banner';
Expand Down Expand Up @@ -162,7 +163,7 @@ export const spec = {
};
const bidFloor = getBidFloor(bid, 'banner', '*');
if (isNaN(bidFloor)) {
logWarn(`IMDS: there is an invalid bid floor: ${bid.params.bidfloor}`);
logWarn(`Advertising.com: there is an invalid bid floor: ${bid.params.bidfloor}`);
}
if (bidFloor !== null && !isNaN(bidFloor)) {
imp.bidfloor = bidFloor;
Expand All @@ -186,7 +187,7 @@ export const spec = {
};
const bidFloor = getBidFloor(bid, 'video', size);
if (isNaN(bidFloor)) {
logWarn(`IMDS: there is an invalid bid floor: ${bid.params.bidfloor}`);
logWarn(`Advertising.com: there is an invalid bid floor: ${bid.params.bidfloor}`);
}

if (bidFloor !== null && !isNaN(bidFloor)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Overview

```
Module Name: iMedia Digital Services Bidder Adapter
Module Name: Advertising.com Bidder Adapter
Module Type: Bidder Adapter
Maintainer: eng-demand@imds.tv
```

# Description

The iMedia Digital Services adapter requires setup and approval from iMedia Digital Services.
The Advertising.com adapter requires setup and approval from Advertising.com.
Please reach out to your account manager for more information.

### Google Ad Manager Video Creative
Expand All @@ -30,7 +30,7 @@ https://track.technoratimedia.com/openrtb/tags?ID=%%PATTERN:hb_uuid_imds%%&AUCTI
}
},
bids: [{
bidder: "imds",
bidder: "advertising",
params: {
seatId: "prebid",
tagId: "demo1",
Expand All @@ -49,7 +49,7 @@ https://track.technoratimedia.com/openrtb/tags?ID=%%PATTERN:hb_uuid_imds%%&AUCTI
}
},
bids: [{
bidder: "imds",
bidder: "advertising",
params: {
seatId: "prebid",
tagId: "demo1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { assert, expect } from 'chai';
import { BANNER } from 'src/mediaTypes.js';
import { config } from 'src/config.js';
import { spec } from 'modules/imdsBidAdapter.js';
import { spec } from 'modules/advertisingBidAdapter.js';
import * as utils from 'src/utils.js';

describe('imdsBidAdapter ', function () {
describe('advertisingBidAdapter ', function () {
describe('isBidRequestValid', function () {
let bid;
beforeEach(function () {
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('imdsBidAdapter ', function () {
});
describe('buildRequests', function () {
let validBidRequestVideo = {
bidder: 'imds',
bidder: 'advertising',
params: {
seatId: 'prebid',
tagId: '1234',
Expand All @@ -141,7 +141,7 @@ describe('imdsBidAdapter ', function () {
};

let bidderRequestVideo = {
bidderCode: 'imds',
bidderCode: 'advertising',
auctionId: 'VideoAuctionId124',
bidderRequestId: '117954d20d7c9c',
auctionStart: 1553624929697,
Expand Down Expand Up @@ -576,7 +576,7 @@ describe('imdsBidAdapter ', function () {
});
it('should use all the video params in the impression request', function () {
let validBidRequestVideo = {
bidder: 'imds',
bidder: 'advertising',
params: {
seatId: 'prebid',
tagId: '1234',
Expand Down Expand Up @@ -634,7 +634,7 @@ describe('imdsBidAdapter ', function () {
});
it('should move any video params in the mediaTypes object to params.video object', function () {
let validBidRequestVideo = {
bidder: 'imds',
bidder: 'advertising',
params: {
seatId: 'prebid',
tagId: '1234',
Expand Down Expand Up @@ -692,7 +692,7 @@ describe('imdsBidAdapter ', function () {
});
it('should create params.video object if not present on bid request and move any video params in the mediaTypes object to it', function () {
let validBidRequestVideo = {
bidder: 'imds',
bidder: 'advertising',
params: {
seatId: 'prebid',
tagId: '1234'
Expand Down Expand Up @@ -790,7 +790,7 @@ describe('imdsBidAdapter ', function () {

describe('Bid Requests with placementId should be backward compatible ', function () {
let validVideoBidReq = {
bidder: 'imds',
bidder: 'advertising',
params: {
seatId: 'prebid',
placementId: 'demo1',
Expand Down Expand Up @@ -831,7 +831,7 @@ describe('imdsBidAdapter ', function () {
refererInfo: {
referer: 'http://localhost:9999/'
},
bidderCode: 'imds',
bidderCode: 'advertising',
auctionId: 'f8a75621-d672-4cbb-9275-3db7d74fb110'
};

Expand All @@ -852,7 +852,7 @@ describe('imdsBidAdapter ', function () {

describe('Bid Requests with schain object ', function () {
let validBidReq = {
bidder: 'imds',
bidder: 'advertising',
params: {
seatId: 'prebid',
tagId: 'demo1',
Expand Down Expand Up @@ -894,12 +894,12 @@ describe('imdsBidAdapter ', function () {
refererInfo: {
referer: 'http://localhost:9999/'
},
bidderCode: 'imds',
bidderCode: 'advertising',
auctionId: 'f8a75621-d672-4cbb-9275-3db7d74fb110',
bidderRequestId: '16d438671bfbec',
bids: [
{
bidder: 'imds',
bidder: 'advertising',
params: {
seatId: 'prebid',
tagId: 'demo1',
Expand Down Expand Up @@ -1394,7 +1394,7 @@ describe('imdsBidAdapter ', function () {

describe('Bid Requests with price module should use if available', function () {
let validVideoBidRequest = {
bidder: 'imds',
bidder: 'advertising',
params: {
bidfloor: '0.50',
seatId: 'prebid',
Expand Down Expand Up @@ -1437,7 +1437,7 @@ describe('imdsBidAdapter ', function () {
refererInfo: {
referer: 'http://localhost:9999/'
},
bidderCode: 'imds',
bidderCode: 'advertising',
auctionId: 'f8a75621-d672-4cbb-9275-3db7d74fb110'
};

Expand All @@ -1464,7 +1464,7 @@ describe('imdsBidAdapter ', function () {

describe('Bid Requests with gpid or anything in bid.ext should use if available', function () {
let validVideoBidRequest = {
bidder: 'imds',
bidder: 'advertising',
params: {
seatId: 'prebid',
placementId: 'demo1',
Expand Down Expand Up @@ -1521,7 +1521,7 @@ describe('imdsBidAdapter ', function () {
refererInfo: {
referer: 'http://localhost:9999/'
},
bidderCode: 'imds',
bidderCode: 'advertising',
auctionId: 'f8a75621-d672-4cbb-9275-3db7d74fb110'
};

Expand Down