-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New adapter: cortex #14811
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 adapter: cortex #14811
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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', | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| code: 'addunit3', | ||
| mediaTypes: { | ||
| native: { | ||
| title: { | ||
| required: true | ||
| }, | ||
| body: { | ||
| required: true | ||
| }, | ||
| icon: { | ||
| required: true, | ||
| size: [64, 64] | ||
| } | ||
| } | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: 'cortex', | ||
| params: { | ||
| placementId: 'testNative', | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ]; | ||
| ``` | ||
| 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> = { | ||
|
cortex-tech marked this conversation as resolved.
|
||
| code: BIDDER_CODE, | ||
|
Comment on lines
+14
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new bidder spec omits Useful? React with 👍 / 👎. |
||
| supportedMediaTypes: [BANNER, VIDEO, NATIVE], | ||
|
|
||
| isBidRequestValid: isBidRequestValid(), | ||
| buildRequests: buildRequests(AD_URL), | ||
| interpretResponse, | ||
| getUserSyncs: getUserSyncs(SYNC_URL) | ||
| }; | ||
|
|
||
| registerBidder(spec); | ||
Uh oh!
There was an error while loading. Please reload this page.