Skip to content

Commit

Permalink
pick up wrapper family detail (prebid#6272)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrmartinez authored and icflournoy committed Feb 5, 2021
1 parent f07fd30 commit 4ba4a29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/rubiconAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,10 @@ function sendMessage(auctionId, bidWonId) {
referrerHostname: rubiconAdapter.referrerHostname || getHostNameFromReferer(referrer),
channel: 'web',
};
if (rubiConf.wrapperName || rubiConf.rule_name) {
if (rubiConf.wrapperName) {
message.wrapper = {
name: rubiConf.wrapperName,
family: rubiConf.wrapperFamily,
rule: rubiConf.rule_name
}
}
Expand Down
6 changes: 4 additions & 2 deletions test/spec/modules/rubiconAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,8 @@ describe('rubicon analytics adapter', function () {
describe('wrapper details passed in', () => {
it('should correctly pass in the wrapper details if provided', () => {
config.setConfig({rubicon: {
wrapperName: '1001_wrapperName',
wrapperName: '1001_wrapperName_exp.4',
wrapperFamily: '1001_wrapperName',
rule_name: 'na-mobile'
}});

Expand All @@ -1771,7 +1772,8 @@ describe('rubicon analytics adapter', function () {
const request = server.requests[0];
const message = JSON.parse(request.requestBody);
expect(message.wrapper).to.deep.equal({
name: '1001_wrapperName',
name: '1001_wrapperName_exp.4',
family: '1001_wrapperName',
rule: 'na-mobile'
});

Expand Down

0 comments on commit 4ba4a29

Please sign in to comment.