-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Copper6 adapter: change utility suite #14991
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
Changes from 4 commits
ee4645d
368b665
484ae15
c4bb9bd
dbcc625
d5936a5
c36c8ca
20e8020
255fc29
50ab3f8
fe770c3
48d8df4
db838bd
c9d0abd
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,9 @@ | ||
| import { VidazooBaseBidderParams } from "../libraries/vidazooUtils/vidazooTypes.ts"; | ||
|
|
||
| export type Copper6SSPBidRequestParams = VidazooBaseBidderParams | ||
|
|
||
| declare module '../src/adUnits' { | ||
| interface BidderParams { | ||
| copper6ssp: Copper6SSPBidRequestParams; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,53 @@ | ||
| 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'; | ||
| import { BANNER, VIDEO } from '../src/mediaTypes.js'; | ||
| import { getStorageManager } from '../src/storageManager.js'; | ||
| import { | ||
| isBidRequestValid, | ||
| onBidWon, | ||
| createUserSyncGetter, | ||
| createBuildRequestsFn, | ||
| createInterpretResponseFn | ||
| } from '../libraries/vidazooUtils/bidderUtils.js'; | ||
|
|
||
| /** | ||
| * @typedef {import('./copper6sspBidAdapter.d.ts').Copper6SSPBidRequestParams} Copper6SSPBidRequestParams | ||
| */ | ||
|
|
||
| const DEFAULT_SUB_DOMAIN = 'bidder'; | ||
| const BIDDER_CODE = 'copper6ssp'; | ||
| const AD_URL = 'https://endpoint.copper6.com/pbjs'; | ||
| const SYNC_URL = 'https://сsync.copper6.com'; | ||
| const BIDDER_VERSION = '1.0.0'; | ||
| const GVLID = 1356; | ||
| export const storage = getStorageManager({ bidderCode: BIDDER_CODE }); | ||
|
|
||
| export function createDomain(subDomain = DEFAULT_SUB_DOMAIN) { | ||
| return `https://${subDomain}.copper6.com`; | ||
| } | ||
|
|
||
| function createUniqueRequestData(hashUrl, bid) { | ||
| const { auctionId, transactionId } = bid; | ||
| return { | ||
| auctionId, | ||
| transactionId | ||
| }; | ||
| } | ||
|
|
||
| const buildRequests = createBuildRequestsFn(createDomain, createUniqueRequestData, storage, BIDDER_CODE, BIDDER_VERSION, false); | ||
| const interpretResponse = createInterpretResponseFn(BIDDER_CODE, false); | ||
| const getUserSyncs = createUserSyncGetter({ | ||
| iframeSyncUrl: 'https://sync.copper6.com/api/sync/iframe', | ||
| imageSyncUrl: 'https://sync.copper6.com/api/sync/image' | ||
| }); | ||
|
|
||
| export const spec = { | ||
| code: BIDDER_CODE, | ||
| version: BIDDER_VERSION, | ||
| supportedMediaTypes: [BANNER, VIDEO], | ||
| gvlid: GVLID, | ||
| supportedMediaTypes: [BANNER, VIDEO, NATIVE], | ||
|
|
||
| isBidRequestValid: isBidRequestValid(), | ||
| buildRequests: buildRequests(AD_URL), | ||
| isBidRequestValid, | ||
|
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.
For existing publishers using the previously documented Useful? React with 👍 / 👎. |
||
| buildRequests, | ||
| interpretResponse, | ||
| getUserSyncs: getUserSyncs(SYNC_URL) | ||
| getUserSyncs, | ||
| onBidWon, | ||
| }; | ||
|
|
||
| registerBidder(spec); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,79 +1,36 @@ | ||
| # Overview | ||
|
|
||
| ``` | ||
| Module Name: Copper6SSP Bidder Adapter | ||
| Module Type: Copper6SSP Bidder Adapter | ||
| Maintainer: info@copper6.com | ||
| ``` | ||
| **Module Name:** Copper6 Bidder Adapter | ||
|
|
||
| **Module Type:** Bidder Adapter | ||
|
|
||
| **Maintainer:** operations@copper6.com | ||
|
|
||
| # Description | ||
|
|
||
| Connects to Copper6SSP exchange for bids. | ||
| Copper6SSP bid adapter supports Banner, Video (instream and outstream) and Native. | ||
| Module that connects to Copper6's demand sources. | ||
|
|
||
| # Test Parameters | ||
| ``` | ||
| var adUnits = [ | ||
| // Will return static test banner | ||
| { | ||
| code: 'adunit1', | ||
| mediaTypes: { | ||
| banner: { | ||
| sizes: [ [300, 250], [320, 50] ], | ||
| } | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: 'copper6ssp', | ||
| params: { | ||
| placementId: 'testBanner', | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| code: 'addunit2', | ||
| mediaTypes: { | ||
| video: { | ||
| playerSize: [ [640, 480] ], | ||
| context: 'instream', | ||
| minduration: 5, | ||
| maxduration: 60, | ||
| } | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: 'copper6ssp', | ||
| params: { | ||
| placementId: 'testVideo', | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| code: 'addunit3', | ||
| mediaTypes: { | ||
| native: { | ||
| title: { | ||
| required: true | ||
| }, | ||
| body: { | ||
| required: true | ||
| }, | ||
| icon: { | ||
| required: true, | ||
| size: [64, 64] | ||
| } | ||
| } | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: 'copper6ssp', | ||
| params: { | ||
| placementId: 'testNative', | ||
| } | ||
| } | ||
| ] | ||
|
|
||
| ```js | ||
| var adUnits = [ | ||
| { | ||
| code: 'test-ad', | ||
| sizes: [[300, 250]], | ||
| bids: [ | ||
| { | ||
| bidder: 'copper6ssp', | ||
| params: { | ||
|
Collaborator
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. What are these params, it seems In order to not break existing integrations you'll need to figure out some sort of translation layer
Contributor
Author
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. We explain this params in Documentation
Collaborator
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. your doc file has the wrong name, you can't force pubs to change params in a minor version so you should figure out how to translate what they do now to what you want
Contributor
Author
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. I see. I will work on it. Thank you
Contributor
Author
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. @patmmccann we have internal discussion and have talked to Copper6 team to understand the impact on the partners that use the adapter. Copper6 team took responsibility of the requested change. The request initially came from them and they will manage all publishers accordingly. Please see the attached conversation.
Contributor
Author
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. Hi @patmmccann
Collaborator
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. Even if they made it themselves, the issue is it is breaking; why doesn't perion do a server side translation of the requests without the required params? If there's only 18 pubs, surely you can ease their pain by inferring a cid and pid server side from their referer URL and placementId?
Collaborator
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. We expect to publish v12 in May or June of 2027
Contributor
Author
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. @patmmccann |
||
| cId: '562524b21b1c1f08117667f9', | ||
| pId: '59ac17c192832d0016683fe3', | ||
| bidFloor: 0.0001, | ||
| ext: { | ||
| param1: 'loremipsum', | ||
|
patmmccann marked this conversation as resolved.
Outdated
|
||
| param2: 'dolorsitamet' | ||
| } | ||
| } | ||
| ]; | ||
| ``` | ||
| } | ||
| ] | ||
| } | ||
| ]; | ||
| ``` | ||

Uh oh!
There was an error while loading. Please reload this page.