Skip to content

Commit

Permalink
Update to change analytics flag from array to object (prebid#6681)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoschovas authored and umakajan committed May 6, 2021
1 parent 01e5f05 commit cfa23c4
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 @@ -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 () {
Expand All @@ -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 () {
Expand Down

0 comments on commit cfa23c4

Please sign in to comment.