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
7 changes: 3 additions & 4 deletions libraries/teqblazeUtils/bidderUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ const PROTOCOL_PATTERN = /^[a-z0-9.+-]+:/i;

type Mode = 'every' | 'some';

interface TeqBlazeBidParams {
placementId?: string | number;
endpointId?: string | number;
}
export type TeqBlazeBidParams =
| { placementId: string | number; endpointId?: string | number }
| { placementId?: string | number; endpointId: string | number };

interface RequestBody {
deviceWidth: number;
Expand Down
88 changes: 88 additions & 0 deletions modules/cortexBidAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Overview

```
Module Name: Cortex Bidder Adapter
Module Type: Cortex Bidder Adapter
Maintainer: dev@cortextech.it
```

# Description

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

# Bid Params

| Name | Scope | Description | Example | Type |
|---|---|---|---|---|
| placementId | optional* | Placement ID from the Cortex platform. Required when `endpointId` is not set. | `'testBanner'` | `string` |
| endpointId | optional* | Endpoint ID from the Cortex platform. Required when `placementId` is not set. | `'testEndpoint'` | `string` |

\* At least one of `placementId` or `endpointId` must be provided.

# Test Parameters
```
var adUnits = [
// Will return static test banner
{
code: 'adunit1',
mediaTypes: {
banner: {
sizes: [ [300, 250], [320, 50] ],
}
},
bids: [
{
bidder: 'cortex',
params: {
placementId: 'testBanner',
}
}
]
},
{
code: 'addunit2',
mediaTypes: {
video: {
playerSize: [ [640, 480] ],
context: 'instream',
minduration: 5,
maxduration: 60,
}
},
bids: [
{
bidder: 'cortex',
params: {
placementId: 'testVideo',
Comment thread
cortex-tech marked this conversation as resolved.
}
}
]
},
{
code: 'addunit3',
mediaTypes: {
native: {
title: {
required: true
},
body: {
required: true
},
icon: {
required: true,
size: [64, 64]
}
}
},
bids: [
{
bidder: 'cortex',
params: {
placementId: 'testNative',
}
}
]
}
];
```
25 changes: 25 additions & 0 deletions modules/cortexBidAdapter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { type BidderSpec, registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import { isBidRequestValid, buildRequests, interpretResponse, getUserSyncs, type TeqBlazeBidParams } from '../libraries/teqblazeUtils/bidderUtils.ts';

declare module '../src/adUnits' {
interface BidderParams {
[BIDDER_CODE]: TeqBlazeBidParams;
}
}

const BIDDER_CODE = 'cortex';
const AD_URL = 'https://eu.targetadserver.com/pbjs';
const SYNC_URL = 'https://sync.targetadserver.com';

export const spec: BidderSpec<typeof BIDDER_CODE> = {
Comment thread
cortex-tech marked this conversation as resolved.
code: BIDDER_CODE,
Comment on lines +14 to +16
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 Add GVL ID to avoid GDPR auction blocking

The new bidder spec omits gvlid, which means consent enforcement cannot map this adapter to a vendor under consentManagementTcf; in GDPR-enabled auctions, requests for this bidder can be blocked even though the adapter already forwards GDPR/GPP signals. This effectively prevents the adapter from bidding in EU traffic unless publishers disable or loosen enforcement, so the spec should declare the adapter’s vendor ID (or explicitly document that GDPR operation is unsupported).

Useful? React with 👍 / 👎.

supportedMediaTypes: [BANNER, VIDEO, NATIVE],

isBidRequestValid: isBidRequestValid(),
buildRequests: buildRequests(AD_URL),
interpretResponse,
getUserSyncs: getUserSyncs(SYNC_URL)
};

registerBidder(spec);
Loading
Loading