Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pubai Analytics Adapter : replaced adUnitCount with adUnits array #9510

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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