Skip to content

Commit

Permalink
Update: Replaced adUnitCount with adUnits array (prebid#9510)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnh-pubx authored and jorgeluisrocha committed May 18, 2023
1 parent ad93a28 commit 997778d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/pubxaiAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CONSTANTS from '../src/constants.json';

const emptyUrl = '';
const analyticsType = 'endpoint';
const pubxaiAnalyticsVersion = 'v1.1.0';
const pubxaiAnalyticsVersion = 'v1.2.0';
const defaultHost = 'api.pbxai.com';
const auctionPath = '/analytics/auction';
const winningBidPath = '/analytics/bidwon';
Expand Down Expand Up @@ -154,7 +154,7 @@ function send(data, status) {
search: location.search
});
if (typeof data !== 'undefined' && typeof data.auctionInit !== 'undefined') {
data.pageDetail.adUnitCount = data.auctionInit.adUnitCodes ? data.auctionInit.adUnitCodes.length : null;
data.pageDetail.adUnits = data.auctionInit.adUnitCodes;
data.initOptions.auctionId = data.auctionInit.auctionId;
delete data.auctionInit;

Expand Down
4 changes: 3 additions & 1 deletion test/spec/modules/pubxaiAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@ describe('pubxai analytics adapter', function() {
'host': location.host,
'path': location.pathname,
'search': location.search,
'adUnitCount': 1
'adUnits': [
'/19968336/header-bid-tag-1'
]
},
'floorDetail': {
'fetchStatus': 'success',
Expand Down

0 comments on commit 997778d

Please sign in to comment.