Skip to content
4 changes: 3 additions & 1 deletion libraries/vidazooUtils/bidderUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
setStorageItem(storage, key, nextValue, timestamp);
return nextValue;
} catch (e) {
return 0;

Check warning on line 127 in libraries/vidazooUtils/bidderUtils.js

View workflow job for this annotation

GitHub Actions / Coverage

127 line is not covered with tests
}
}

Expand Down Expand Up @@ -338,7 +338,6 @@
url: encodeURIComponent(topWindowUrl),
uqs: getTopWindowQueryParams(),
cb: Date.now(),
bidFloor: bidFloor,
bidId: bidId,
referrer: bidderRequest.refererInfo.ref,
adUnitCode: adUnitCode,
Expand Down Expand Up @@ -368,6 +367,9 @@
...uniqueRequestData
};

if (bidFloor) {
data.bidFloor = bidFloor;
}
// backward compatible userId generators
if (bid.userIdAsEids?.length > 0) {
appendUserIdsAsEidsToRequestPayload(data, bid.userIdAsEids);
Expand Down
6 changes: 4 additions & 2 deletions libraries/vidazooUtils/vidazooTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ export interface VidazooBaseBidderParams {
/**
* The minimum bid value desired. Adapter will not respond with bids lower than this value
*/
bidFloor: number;
bidFloor?: number;
/**
* Placement id on platform.
*/

placementId?: number;
/**
* Custom parameters for the request
*/
ext?: Ext;
/**
* Subdomain define subdomain in the bid request URL
Expand Down
33 changes: 33 additions & 0 deletions modules/copper6sspBidAdapter.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Ext } from '../libraries/vidazooUtils/vidazooTypes.ts';

interface Copper6SSPCommonParams {
bidFloor?: number;
ext?: Ext;
subDomain?: string;
}

/** Current documented params */
interface Copper6SSPModernParams extends Copper6SSPCommonParams {
cId: string;
pId: string;
placementId?: never;
endpointId?: never;
}

/** Previously documented legacy params */
interface Copper6SSPLegacyParams extends Copper6SSPCommonParams {
placementId: string;
endpointId: string;
cId?: never;
pId?: never;
}

export type Copper6SSPBidRequestParams =
| Copper6SSPModernParams
| Copper6SSPLegacyParams;

declare module '../src/adUnits' {
interface BidderParams {
copper6ssp: Copper6SSPBidRequestParams;
}
}
85 changes: 76 additions & 9 deletions modules/copper6sspBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,88 @@
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 {
extractCID,
extractPID,
onBidWon,
createUserSyncGetter,
createBuildRequestsFn,
createInterpretResponseFn
} from '../libraries/vidazooUtils/bidderUtils.js';

/**
* @typedef {import('./copper6sspBidAdapter.d.ts').Copper6SSPBidRequestParams} Copper6SSPBidRequestParams
*/

const DEFAULT_SUB_DOMAIN = 'exchange';
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';
Comment thread
patmmccann marked this conversation as resolved.
const GVLID = 1356;
const DEFAULT_CID = "600000000000000000000cc6";
const DEFAULT_PID = "600000000000000000000dc6";
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
};
}

function legacySupport(createDomain, createUniqueRequestData, storage, BIDDER_CODE, BIDDER_VERSION, allowSingleRequest = false) {
const buildFunction = createBuildRequestsFn(createDomain, createUniqueRequestData, storage, BIDDER_CODE, BIDDER_VERSION, allowSingleRequest);

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 Declare the newly persisted deal identifier

Every Copper6 request now passes this storage manager into createBuildRequestsFn, whose shared request builder calls getUniqueDealId and persists a page-derived identifier under u_<hash>. The repository's generated Copper6 metadata currently records no disclosures from https://ssp.copper6.com/deviceStorage.json, and the module documentation does not describe this storage, so this newly introduced identifier needs the required device-storage disclosure and documentation before the adapter ships.

AGENTS.md reference: AGENTS.md:L75-L75

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fix will be set in the relevant json page.

return function legacyHandler(validBidRequests, bidderRequest) {
const modifiedRequests = validBidRequests.map(request => {
if (!request.params?.cId) {
if (request.params?.placementId) {
request.params.cId = request.params.placementId;
} else {
request.params.cId = DEFAULT_CID;
}
delete request.params.placementId;
}
if (!request.params?.pId) {
if (request.params?.endpointId) {
request.params.pId = request.params.endpointId;
} else {
request.params.pId = DEFAULT_PID;
}
}
return request;
});
return buildFunction(modifiedRequests, bidderRequest);
};
}

const buildRequests = legacySupport(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'
});

function isBidRequestValid(bid) {
const p = bid.params || {};
const hasNew = extractCID(p) && extractPID(p);
const hasLegacy = p.placementId && p.endpointId;
return !!(hasNew || hasLegacy);
}

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,

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 Validate legacy params before normalizing them

For existing publishers using the previously documented placementId/endpointId parameters, core calls isBidRequestValid before buildRequests, and this imported validator requires both cId and pId. Those bids are therefore discarded before legacySupport can translate the legacy fields or apply its defaults, so the added compatibility path is unreachable during a real auction; the validator must accept the legacy forms that the build wrapper handles.

Useful? React with 👍 / 👎.

buildRequests,
interpretResponse,
getUserSyncs: getUserSyncs(SYNC_URL)
getUserSyncs,
onBidWon,
};

registerBidder(spec);
98 changes: 27 additions & 71 deletions modules/copper6sspBidAdapter.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,35 @@
# 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: {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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

@anna-y-perion anna-y-perion Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We explain this params in Documentation
https://github.com/prebid/prebid.github.io/pull/6597/changes
We have added these type recently
@typedef {import('./copper6sspBidAdapter.d.ts').Copper6SSPBidRequestParams} Copper6SSPBidRequestParams
I thought that this file was requested for additional clarity of the code.
Also I have changed the "ext" object and added comment to have some explanation. Do you think it is clearer now?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see. I will work on it. Thank you

@anna-y-perion anna-y-perion Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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.
Can it be possible from this perspective to approve the change we want to make in minor version?
image (9)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @patmmccann
Is there any chance that the awareness of the partner from Copper6 (see my previous comment) can make this pr appropriate for a minor version?
If not - do you have any idea when v12 is expected to be published?

@patmmccann patmmccann Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We expect to publish v12 in May or June of 2027

@anna-y-perion anna-y-perion Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@patmmccann
We had find the way to accept old style bid requests on our end and changed the adapter accordingly.
We do not want to wait till the v12. :)
Please review.

cId: '562524b21b1c1f08117667f9',
pId: '59ac17c192832d0016683fe3',
bidFloor: 0.0001,
ext: {
// custom params that were recomended to add by a partner
}
}
];
```
}
]
}
];
```
Loading
Loading