From cfa23c4ae5f2404baecabcea385ac1f7e91844f7 Mon Sep 17 00:00:00 2001 From: mmoschovas <63253416+mmoschovas@users.noreply.github.com> Date: Fri, 30 Apr 2021 19:11:40 -0400 Subject: [PATCH] Update to change analytics flag from array to object (#6681) --- modules/rubiconBidAdapter.js | 2 +- test/spec/modules/rubiconBidAdapter_spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/rubiconBidAdapter.js b/modules/rubiconBidAdapter.js index 6c6ac83318a4..6dbda3dbe107 100644 --- a/modules/rubiconBidAdapter.js +++ b/modules/rubiconBidAdapter.js @@ -203,7 +203,7 @@ export const spec = { let modules = (getGlobal()).installedModules; if (modules && (!modules.length || modules.indexOf('rubiconAnalyticsAdapter') !== -1)) { - utils.deepSetValue(data, 'ext.prebid.analytics', [{ 'adapter': 'rubicon', 'client-analytics': true }]); + utils.deepSetValue(data, 'ext.prebid.analytics', {'rubicon': {'client-analytics': true}}); } let bidFloor; diff --git a/test/spec/modules/rubiconBidAdapter_spec.js b/test/spec/modules/rubiconBidAdapter_spec.js index 6b061e3157d1..d9b9921b23ff 100644 --- a/test/spec/modules/rubiconBidAdapter_spec.js +++ b/test/spec/modules/rubiconBidAdapter_spec.js @@ -1672,7 +1672,7 @@ describe('the rubicon adapter', function () { let payload = request.data; expect(payload.ext.prebid.analytics).to.not.be.undefined; - expect(payload.ext.prebid.analytics).to.deep.equal([{'adapter': 'rubicon', 'client-analytics': true}]); + expect(payload.ext.prebid.analytics).to.deep.equal({'rubicon': {'client-analytics': true}}); }); it('should pass client analytics to PBS endpoint if rubicon analytics adapter is included', function () { @@ -1682,7 +1682,7 @@ describe('the rubicon adapter', function () { let payload = request.data; expect(payload.ext.prebid.analytics).to.not.be.undefined; - expect(payload.ext.prebid.analytics).to.deep.equal([{'adapter': 'rubicon', 'client-analytics': true}]); + expect(payload.ext.prebid.analytics).to.deep.equal({'rubicon': {'client-analytics': true}}); }); it('should not pass client analytics to PBS endpoint if rubicon analytics adapter is not included', function () {