Skip to content

Commit d5746c3

Browse files
Bill Newmanvladis-teqblazeAiholkinMykhailo Yaremchuk
authored
Colosuss Bid Adapter: add support First Party Data (prebid#9340)
* add video&native traffic colossus ssp * Native obj validation * Native obj validation #2 * Added size field in requests * fixed test * fix merge conflicts * move to 3.0 * move to 3.0 * fix IE11 new URL issue * fix IE11 new URL issue * fix IE11 new URL issue * https for 3.0 * add https test * add ccp and schain features * fix test * sync with upstream, fix conflicts * Update colossussspBidAdapter.js remove commented code * Update colossussspBidAdapter.js lint fix * identity extensions * identity extensions * fix * fix * fix * fix * fix * add tests for user ids * fix * fix * fix * fix * fix * fix * fix * add gdpr support * add gdpr support * id5id support * Update colossussspBidAdapter.js add bidfloor parameter * Update colossussspBidAdapter.js check bidfloor * Update colossussspBidAdapter.js * Update colossussspBidAdapter.js * Update colossussspBidAdapter.js * Update colossussspBidAdapter_spec.js * use floor module * Revert "use floor module" This reverts commit f0c5c24. * use floor module * update to 5v * fix * add uid2 and bidFloor support * fix * add pbadslot support * fix conflicts * add onBidWon * refactor * add test for onBidWon() * fix * add group_id * Trigger circleci * fix * update user sync * fix window.location * fix test * updates * fix conflict * fix * updates * remove traffic param * add transactionId to request data for colossusssp adapter * Send tid in placements array * update user sync * updated tests * remove changes package-lock file * fix * add First Party Data Co-authored-by: Vladislav Isaiko <[email protected]> Co-authored-by: Aiholkin <[email protected]> Co-authored-by: Mykhailo Yaremchuk <[email protected]>
1 parent b468831 commit d5746c3

File tree

2 files changed

+97
-2
lines changed

2 files changed

+97
-2
lines changed

modules/colossussspBidAdapter.js

+8
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ export const spec = {
8787
logMessage(e);
8888
}
8989

90+
const firstPartyData = bidderRequest.ortb2 || {};
91+
const userObj = firstPartyData.user;
92+
const siteObj = firstPartyData.site;
93+
const appObj = firstPartyData.app;
94+
9095
// TODO: does the fallback to window.location make sense?
9196
const location = refferLocation || winLocation;
9297
let placements = [];
@@ -97,6 +102,9 @@ export const spec = {
97102
secure: location.protocol === 'https:' ? 1 : 0,
98103
host: location.host,
99104
page: location.pathname,
105+
userObj,
106+
siteObj,
107+
appObj,
100108
placements: placements
101109
};
102110

test/spec/modules/colossussspBidAdapter_spec.js

+89-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,93 @@ describe('ColossussspAdapter', function () {
5656
referer: 'http://www.example.com',
5757
reachedTop: true,
5858
},
59+
ortb2: {
60+
app: {
61+
name: 'myappname',
62+
keywords: 'power tools, drills',
63+
content: {
64+
data: [
65+
{
66+
name: 'www.dataprovider1.com',
67+
ext: {
68+
segtax: 6
69+
},
70+
segment: [
71+
{
72+
id: '687'
73+
},
74+
{
75+
id: '123'
76+
}
77+
]
78+
},
79+
{
80+
name: 'www.dataprovider1.com',
81+
ext: {
82+
segtax: 7
83+
},
84+
segment: [
85+
{
86+
id: '456'
87+
},
88+
{
89+
id: '789'
90+
}
91+
]
92+
}
93+
]
94+
}
95+
},
96+
site: {
97+
name: 'example',
98+
domain: 'page.example.com',
99+
cat: ['IAB2'],
100+
sectioncat: ['IAB2-2'],
101+
pagecat: ['IAB2-2'],
102+
page: 'https://page.example.com/here.html',
103+
ref: 'https://ref.example.com',
104+
keywords: 'power tools, drills',
105+
search: 'drill',
106+
content: {
107+
userrating: '4',
108+
data: [{
109+
name: 'www.dataprovider1.com',
110+
ext: {
111+
segtax: 7,
112+
cids: ['iris_c73g5jq96mwso4d8']
113+
},
114+
segment: [
115+
{ id: '687' },
116+
{ id: '123' }
117+
]
118+
}]
119+
},
120+
ext: {
121+
data: {
122+
pageType: 'article',
123+
category: 'repair'
124+
}
125+
}
126+
},
127+
user: {
128+
yob: 1985,
129+
gender: 'm',
130+
keywords: 'a,b',
131+
data: [{
132+
name: 'dataprovider.com',
133+
ext: { segtax: 4 },
134+
segment: [
135+
{ id: '1' }
136+
]
137+
}],
138+
ext: {
139+
data: {
140+
registered: true,
141+
interests: ['cars']
142+
}
143+
}
144+
}
145+
},
59146
bids: [bid]
60147
}
61148

@@ -91,7 +178,7 @@ describe('ColossussspAdapter', function () {
91178
it('Returns valid data if array of bids is valid', function () {
92179
let data = serverRequest.data;
93180
expect(data).to.be.an('object');
94-
expect(data).to.have.all.keys('deviceWidth', 'deviceHeight', 'language', 'secure', 'host', 'page', 'placements', 'ccpa', 'gdpr_consent', 'gdpr_require');
181+
expect(data).to.have.all.keys('deviceWidth', 'deviceHeight', 'language', 'secure', 'host', 'page', 'placements', 'ccpa', 'gdpr_consent', 'gdpr_require', 'userObj', 'siteObj', 'appObj');
95182
expect(data.deviceWidth).to.be.a('number');
96183
expect(data.deviceHeight).to.be.a('number');
97184
expect(data.language).to.be.a('string');
@@ -132,7 +219,7 @@ describe('ColossussspAdapter', function () {
132219

133220
let data = serverRequest.data;
134221
expect(data).to.be.an('object');
135-
expect(data).to.have.all.keys('deviceWidth', 'deviceHeight', 'language', 'secure', 'host', 'page', 'placements', 'ccpa', 'gdpr_consent', 'gdpr_require');
222+
expect(data).to.have.all.keys('deviceWidth', 'deviceHeight', 'language', 'secure', 'host', 'page', 'placements', 'ccpa', 'gdpr_consent', 'gdpr_require', 'userObj', 'siteObj', 'appObj');
136223
expect(data.deviceWidth).to.be.a('number');
137224
expect(data.deviceHeight).to.be.a('number');
138225
expect(data.language).to.be.a('string');

0 commit comments

Comments
 (0)