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

Criteo Bid Adapter: Add support for app.publisher.id in bid request #10837

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions modules/criteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ function buildCdbRequest(context, bidRequests, bidderRequest) {
};
request.user = bidderRequest.ortb2?.user || {};
request.site = bidderRequest.ortb2?.site || {};
request.app = bidderRequest.ortb2?.app || {};
if (bidderRequest && bidderRequest.ceh) {
request.user.ceh = bidderRequest.ceh;
}
Expand Down
24 changes: 24 additions & 0 deletions test/spec/modules/criteoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,30 @@ describe('The Criteo bidding adapter', function () {
expect(request.data.user.uspIab).to.equal('1YNY');
});

it('should properly build a request with site and app ortb fields', function () {
const bidRequests = [];
let app = {
publisher: {
id: 'appPublisherId'
}
};
let site = {
publisher: {
id: 'sitePublisherId'
}
};
const bidderRequest = {
ortb2: {
app: app,
site: site
}
};
const request = spec.buildRequests(bidRequests, bidderRequest);

expect(request.data.app).to.equal(app);
expect(request.data.site).to.equal(site);
});

it('should properly build a request with device sua field', function () {
const sua = {}
const bidRequests = [
Expand Down