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
19 changes: 19 additions & 0 deletions modules/dpaiBidAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import { isBidRequestValid, buildRequests, interpretResponse, getUserSyncs } from '../libraries/teqblazeUtils/bidderUtils.js';

const BIDDER_CODE = 'dpai';
const AD_URL = 'https://ssp.drift-pixel.ai/pbjs';
const SYNC_URL = 'https://sync.drift-pixel.ai';

export const spec = {
code: BIDDER_CODE,
supportedMediaTypes: [BANNER, VIDEO, NATIVE],

isBidRequestValid: isBidRequestValid(),
buildRequests: buildRequests(AD_URL),
interpretResponse,
getUserSyncs: getUserSyncs(SYNC_URL)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Append CCPA consent to DPAI user syncs

Wiring getUserSyncs: getUserSyncs(SYNC_URL) here pulls in the teqblaze helper that only appends CCPA when uspConsent.consentString exists, but registerSyncs passes bidderRequest.uspConsent directly from the bidder request (a raw USP string in Prebid), so in real auctions this adapter’s sync URL will omit ccpa_consent even when USP consent is available. This can send sync traffic without the expected privacy signal in CCPA flows.

Useful? React with 👍 / 👎.

};

registerBidder(spec);
79 changes: 79 additions & 0 deletions modules/dpaiBidAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Overview

```
Module Name: DPAI Bidder Adapter
Module Type: DPAI Bidder Adapter
Maintainer: adops@driftpixel.ai
```

# Description

Connects to DPAI exchange for bids.
DPAI bid adapter supports Banner, Video (instream and outstream) and Native.

# Test Parameters
```
var adUnits = [
// Will return static test banner
{
code: 'adunit1',
mediaTypes: {
banner: {
sizes: [ [300, 250], [320, 50] ],
}
},
bids: [
{
bidder: 'dpai',
params: {
placementId: 'testBanner',
}
}
]
},
{
code: 'addunit2',
mediaTypes: {
video: {
playerSize: [ [640, 480] ],
context: 'instream',
minduration: 5,
maxduration: 60,
}
},
bids: [
{
bidder: 'dpai',
params: {
placementId: 'testVideo',
}
}
]
},
{
code: 'addunit3',
mediaTypes: {
native: {
title: {
required: true
},
body: {
required: true
},
icon: {
required: true,
size: [64, 64]
}
}
},
bids: [
{
bidder: 'dpai',
params: {
placementId: 'testNative',
}
}
]
}
];
```
Loading
Loading