Skip to content
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

Smartx Bid Adapter: Add Schain support #9244

Merged
merged 68 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
aa0c2de
Add smartclipBidAdapter
May 20, 2020
a4daadc
smartxBidAdapter.js - removed unused variables, removed debug, added …
Skylinar Sep 2, 2020
d87968f
Merge branch 'master' of https://github.com/smartclip-adtech/Prebid.js
Oct 14, 2020
41fb65e
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 14, 2020
a34fc49
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 27, 2020
f5481d7
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 4, 2020
1510b28
Merge commit 'b7ec359ca242ceab4cd0c7e37307247974126e51'
smartclip-adtech Jan 28, 2021
2a965c9
- made outstream player configurable
Skylinar Jan 29, 2021
b577bd3
remove wrong named files
Skylinar Jan 29, 2021
2b96ef1
camelcase
Skylinar Jan 29, 2021
8715820
fix
Skylinar Feb 3, 2021
b55fb7d
Out-Stream render update to SmartPlay 5.2
Skylinar Mar 1, 2021
41ba404
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Mar 1, 2021
1af62e6
ESlint fix
Skylinar Mar 1, 2021
1ef8d74
ESlint fix
Skylinar Mar 1, 2021
9134944
ESlint fix
Skylinar Mar 1, 2021
335b9bd
adjust tests, fixes
Skylinar Mar 5, 2021
1ae18d1
ESlint
Skylinar Mar 5, 2021
f6d4816
adjusted desired bitrate examples
Skylinar Mar 18, 2021
ed40876
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Mar 18, 2021
94b7510
added bid.meta.advertiserDomains support
Skylinar Apr 8, 2021
fc86b71
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Apr 8, 2021
06934f4
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Apr 14, 2021
4861e23
bug fix for numeric elementID outstream render
Skylinar Apr 14, 2021
e7b1277
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar May 7, 2021
da45be6
fix renderer url
Skylinar May 7, 2021
a52eeea
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar May 27, 2021
b2a5a66
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar May 31, 2021
8943657
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar May 31, 2021
06edd1e
support for floors module
Skylinar Jun 1, 2021
1b36a3c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Jun 1, 2021
c5b25e4
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Jun 10, 2021
d1bd22a
bugfixes to be openRTB 2.5 compliant
Skylinar Jun 10, 2021
2a39091
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Jun 30, 2021
e5916da
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Jul 1, 2021
def250b
update internal renderer usage
Skylinar Jul 1, 2021
cec1e82
remove unused outstream_function logic
Skylinar Jul 1, 2021
e90c67f
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Aug 19, 2021
c0a0139
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Sep 1, 2021
48b6f44
bugfix outstream options for default outstream renderer configuration
Skylinar Sep 1, 2021
effeb19
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Sep 6, 2021
3543835
[PREB-10] fix empty title not configurable
Skylinar Sep 15, 2021
77765b7
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Sep 15, 2021
cf85420
add pbjs version
Skylinar Oct 7, 2021
4e4183c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Oct 7, 2021
440735c
testing with outstream 5.3.0
Skylinar Oct 12, 2021
97b6fae
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Oct 12, 2021
12bd3b6
Merge branch 'master' of https://github.com/prebid/Prebid.js into pbj…
Skylinar Oct 12, 2021
8a77a00
pbjs version into content.ext
Skylinar Nov 9, 2021
4b47bb6
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Nov 9, 2021
d90cfd5
Merge branch 'master' into pbjs_versionlog
Skylinar Nov 9, 2021
f4e059a
Merge commit '6b027f5d960b6d37b9d6fd90d558494b390085a3' into pbjs_ver…
Skylinar Nov 9, 2021
5a6bd11
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Nov 9, 2021
8d31dfd
Merge branch 'master' into pbjs_versionlog
Skylinar Nov 9, 2021
d403904
made visibilityThreshold configurable
Skylinar Nov 9, 2021
913da91
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Nov 10, 2021
a9b42cc
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Nov 11, 2021
59f6521
adjust position of pbjs version
Skylinar Nov 11, 2021
c82ff24
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Nov 17, 2021
b71839d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Mar 2, 2022
8f4cb41
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Jun 23, 2022
d7b5826
Merge branch 'master' of https://github.com/prebid/Prebid.js into HEAD
Skylinar Jul 20, 2022
9299894
Merge branch 'master' of https://github.com/prebid/Prebid.js
Skylinar Jul 20, 2022
935dbd4
update smartclip outstream player version to support outstream 6 rele…
Skylinar Jul 21, 2022
d963c9b
Merge branch 'prebid:master' into master
Skylinar Nov 8, 2022
0efc5ea
Merge branch 'prebid:master' into master
smartclip-adtech Nov 15, 2022
1a6b30b
Add support for schain
Skylinar Nov 15, 2022
75b175a
vacuuming
Skylinar Nov 15, 2022
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
17 changes: 10 additions & 7 deletions modules/smartxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const spec = {
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function (bidRequests, bidderRequest) {
// TODO: does the fallback make sense here?
const page = bidderRequest.refererInfo.page || bidderRequest.refererInfo.topmostLocation;
const isPageSecure = !!page.match(/^https:/)

Expand Down Expand Up @@ -197,16 +196,23 @@ export const spec = {
userExt.fpc = pubcid;
}

// Add schain object if available
if (bid && bid.schain) {
requestPayload['source'] = {
ext: {
schain: bid.schain
}
};
}

// Only add the user object if it's not empty
if (!isEmpty(userExt)) {
requestPayload.user = {
ext: userExt
};
}

// requestPayload.user.ext.ver = pbjs.version;

// Targeting
// Add targeting
if (getBidIdParameter('data', bid.params.user)) {
var targetingarr = [];
for (var i = 0; i < bid.params.user.data.length; i++) {
Expand All @@ -225,8 +231,6 @@ export const spec = {
}
}

// Todo: USER ID MODULE

requestPayload.user = {
ext: userExt,
data: targetingarr
Expand Down Expand Up @@ -269,7 +273,6 @@ export const spec = {
}
/**
* Make sure currency and price are the right ones
* TODO: what about the pre_market_bid partners sizes?
*/
_each(currentBidRequest.params.pre_market_bids, function (pmb) {
if (pmb.deal_id == smartxBid.id) {
Expand Down
32 changes: 32 additions & 0 deletions test/spec/modules/smartxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,38 @@ describe('The smartx adapter', function () {
expect(request.data.imp[0].video.minduration).to.equal(3);
expect(request.data.imp[0].video.maxduration).to.equal(15);
});

it('should pass schain param', function () {
var request;

bid.schain = {
complete: 1,
nodes: [
{
asi: 'indirectseller.com',
sid: '00001',
hp: 1
}
]
}

request = spec.buildRequests([bid], bidRequestObj)[0];

expect(request.data.source).to.deep.equal({
ext: {
schain: {
complete: 1,
nodes: [
{
asi: 'indirectseller.com',
sid: '00001',
hp: 1
}
]
}
}
})
});
});

describe('interpretResponse', function () {
Expand Down