Skip to content

Commit

Permalink
Update to change analytics flag from array to object (#6681)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoschovas authored and idettman committed May 21, 2021
1 parent 47319b8 commit 7a917d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,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 () {
Expand All @@ -1714,7 +1714,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 () {
Expand Down

0 comments on commit 7a917d1

Please sign in to comment.