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

Sonobi Adapter creativeId support #2584

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
7 changes: 6 additions & 1 deletion modules/sonobiBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export const spec = {
return null;
}

// If there is no key_maker data, then dont make the request.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This if loop already exists. Check line above.

if (isEmpty(data)) {
return null;
}

return {
method: 'GET',
url: STR_ENDPOINT,
Expand Down Expand Up @@ -108,7 +113,7 @@ export const spec = {
height: Number(height),
ad: createCreative(bidResponse.sbi_dc, bid.sbi_aid),
ttl: 500,
creativeId: bid.sbi_aid,
creativeId: bid.sbi_crid || bid.sbi_aid,
netRevenue: true,
currency: 'USD'
};
Expand Down
3 changes: 2 additions & 1 deletion test/spec/modules/sonobiBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ describe('SonobiBidAdapter', () => {
'/7780971/sparks_prebid_LB|30b31c1838de1f': {
'sbi_size': '300x600',
'sbi_apoc': 'remnant',
'sbi_crid': '1234abcd',
'sbi_aid': '30292e432662bd5f86d90774b944b039',
'sbi_mouse': 1.07,
},
Expand Down Expand Up @@ -242,7 +243,7 @@ describe('SonobiBidAdapter', () => {
'height': 600,
'ad': '<script type="text/javascript" src="https://mco-1-apex.go.sonobi.com/sbi.js?aid=30292e432662bd5f86d90774b944b039&as=null&ref=localhost:9876"></script>',
'ttl': 500,
'creativeId': '30292e432662bd5f86d90774b944b039',
'creativeId': '1234abcd',
'netRevenue': true,
'currency': 'USD'
},
Expand Down