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

Keywords + Screen resolution + CPU Core #6259

Merged
merged 1 commit into from
Feb 3, 2021
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
13 changes: 12 additions & 1 deletion modules/richaudienceBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ export const spec = {
timeout: config.getConfig('bidderTimeout'),
user: raiSetEids(bid),
demand: raiGetDemandType(bid),
videoData: raiGetVideoInfo(bid)
videoData: raiGetVideoInfo(bid),
scr_rsl: raiGetResolution(),
cpuc: (typeof window.navigator != 'undefined' ? window.navigator.hardwareConcurrency : null),
kws: (!utils.isEmpty(bid.params.keywords) ? bid.params.keywords : null)
};

REFERER = (typeof bidderRequest.refererInfo.referer != 'undefined' ? encodeURIComponent(bidderRequest.refererInfo.referer) : null)
Expand Down Expand Up @@ -242,3 +245,11 @@ function renderAd(bid) {

window.raParams(raPlayerHB, raOutstreamHBPassback, true);
}

function raiGetResolution() {
let resolution = '';
if (typeof window.screen != 'undefined') {
resolution = window.screen.width + 'x' + window.screen.height;
}
return resolution;
}
1 change: 1 addition & 0 deletions modules/richaudienceBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Please reach out to your account manager for more information.
"pid":"ADb1f40rmo",
"supplyType":"site",
"bidfloor":0.40,
"keywords": "bici=scott;coche=audi;coche=mercedes;"
}
}]
}
Expand Down
7 changes: 5 additions & 2 deletions test/spec/modules/richaudienceBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
spec
} from 'modules/richaudienceBidAdapter.js';
import {config} from 'src/config.js';
import * as utils from 'src/utils.js';

describe('Richaudience adapter tests', function () {
var DEFAULT_PARAMS_NEW_SIZES = [{
Expand All @@ -20,7 +19,8 @@ describe('Richaudience adapter tests', function () {
params: {
bidfloor: 0.5,
pid: 'ADb1f40rmi',
supplyType: 'site'
supplyType: 'site',
keywords: 'coche=mercedes;coche=audi'
},
auctionId: '0cb3144c-d084-4686-b0d6-f5dbe917c563',
bidRequestsCount: 1,
Expand Down Expand Up @@ -240,6 +240,9 @@ describe('Richaudience adapter tests', function () {
expect(requestContent).to.have.property('transactionId').and.to.equal('29df2112-348b-4961-8863-1b33684d95e6');
expect(requestContent).to.have.property('timeout').and.to.equal(3000);
expect(requestContent).to.have.property('numIframes').and.to.equal(0);
expect(typeof requestContent.scr_rsl === 'string')
expect(typeof requestContent.cpuc === 'number')
expect(requestContent).to.have.property('kws').and.to.equal('coche=mercedes;coche=audi');
})

it('Verify build request to prebid video inestream', function() {
Expand Down