Skip to content

Commit

Permalink
New Bidder adpater : Adlive Plus
Browse files Browse the repository at this point in the history
  • Loading branch information
aymeric45 committed Mar 5, 2024
1 parent 37e91e7 commit 870997e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
29 changes: 29 additions & 0 deletions modules/adliveplusBidAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Overview

Module Name: Adlive Plus Bidder Adapter

Module Type: Bidder Adapter

Maintainer: support@adlive.io

# Description

Module that connects to Adlive plus demand source to fetch bids.

# Test Parameters
```
const adUnits = [
{
code: 'test-div',
sizes: [[300, 250]],
bids: [
{
bidder: 'adliveplus',
params: {
placementId: '1',
}
}
]
}
];
```
8 changes: 5 additions & 3 deletions modules/luceadBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ import {getUniqueIdentifierStr, logInfo, deepSetValue} from '../src/utils.js';
import {fetch} from '../src/ajax.js';

const bidderCode = 'lucead';
const bidderName = 'Lucead';
let baseUrl = 'https://lucead.com';
let staticUrl = 'https://s.lucead.com';
let companionUrl = 'https://cdn.jsdelivr.net/gh/lucead/prebid-js-external-js-lucead@master/dist/prod.min.js';
let endpointUrl = 'https://prebid.lucead.com/go';
const defaultCurrency = 'EUR';
const defaultTtl = 500;
const aliases = ['adliveplus'];

function isDevEnv() {
return location.hostname.endsWith('.ngrok-free.app') || location.href.startsWith('https://ayads.io/test');
return location.hash.includes('prebid-dev') || location.href.startsWith('https://ayads.io/test');
}

function isBidRequestValid(bidRequest) {
return !!bidRequest?.params?.placementId;
}

export function log(msg, obj) {
logInfo('Lucead - ' + msg, obj);
logInfo(`${bidderName} - ${msg}`, obj);
}

function buildRequests(bidRequests, bidderRequest) {
Expand Down Expand Up @@ -149,7 +151,7 @@ function onTimeout(timeoutData) {
export const spec = {
code: bidderCode,
// gvlid: BIDDER_GVLID,
aliases: [],
aliases,
isBidRequestValid,
buildRequests,
interpretResponse,
Expand Down
2 changes: 1 addition & 1 deletion modules/luceadBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const adUnits = [
sizes: [[300, 250]],
bids: [
{
bidder: "lucead",
bidder: 'lucead',
params: {
placementId: '1',
}
Expand Down

0 comments on commit 870997e

Please sign in to comment.