From af6ac0f35e0d0ada881a7131def7f5f51ff53b7c Mon Sep 17 00:00:00 2001 From: robertrmartinez Date: Wed, 3 Feb 2021 14:31:20 -0800 Subject: [PATCH] pick up wrapper family detail --- modules/rubiconAnalyticsAdapter.js | 3 ++- test/spec/modules/rubiconAnalyticsAdapter_spec.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/rubiconAnalyticsAdapter.js b/modules/rubiconAnalyticsAdapter.js index 679e86aa0a0..f216cbd6235 100644 --- a/modules/rubiconAnalyticsAdapter.js +++ b/modules/rubiconAnalyticsAdapter.js @@ -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 } } diff --git a/test/spec/modules/rubiconAnalyticsAdapter_spec.js b/test/spec/modules/rubiconAnalyticsAdapter_spec.js index 16d25ec400c..71e5446ed06 100644 --- a/test/spec/modules/rubiconAnalyticsAdapter_spec.js +++ b/test/spec/modules/rubiconAnalyticsAdapter_spec.js @@ -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' }}); @@ -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' });