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

New Bidder Adapter: Adlive Plus #11176

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
ncolletti marked this conversation as resolved.
Show resolved Hide resolved

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
4 changes: 2 additions & 2 deletions modules/luceadBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const adUnits = [
sizes: [[300, 250]],
bids: [
{
bidder: "lucead",
bidder: 'lucead',
params: {
placementId: '1',
placementId: '2',
}
}
]
Expand Down