diff --git a/modules/agmaAnalyticsAdapter.js b/modules/agmaAnalyticsAdapter.js index e43dee063c5..f3933cc7625 100644 --- a/modules/agmaAnalyticsAdapter.js +++ b/modules/agmaAnalyticsAdapter.js @@ -17,7 +17,7 @@ import { config } from '../src/config.js'; const GVLID = 1122; const ModuleCode = 'agma'; const analyticsType = 'endpoint'; -const scriptVersion = '1.7.1'; +const scriptVersion = '1.8.0'; const batchDelayInMs = 1000; const agmaURL = 'https://pbc.agma-analytics.de/v1'; const pageViewId = generateUUID(); @@ -127,6 +127,7 @@ export const getPayload = (auctionIds, options) => { }; if (useExtendedPayload) { + const device = config.getConfig('device') || {}; const { x, y } = getScreen(); const userIdsAsEids = getUserIDs(); payload = { @@ -141,6 +142,8 @@ export const getPayload = (auctionIds, options) => { pageUrl: ri.page, screenWidth: x, screenHeight: y, + deviceWidth: device.w || screen.width, + deviceHeight: device.h || screen.height, userIdsAsEids, }; } diff --git a/test/spec/modules/agmaAnalyticsAdapter_spec.js b/test/spec/modules/agmaAnalyticsAdapter_spec.js index ba71624e3b3..df18e7bcf45 100644 --- a/test/spec/modules/agmaAnalyticsAdapter_spec.js +++ b/test/spec/modules/agmaAnalyticsAdapter_spec.js @@ -28,6 +28,8 @@ const extendedKey = [ 'referrer', 'screenHeight', 'screenWidth', + 'deviceWidth', + 'deviceHeight', 'scriptVersion', 'timestamp', 'timezoneOffset', @@ -333,6 +335,8 @@ describe('AGMA Analytics Adapter', () => { expect(request.url).to.equal(INGEST_URL); expect(requestBody).to.have.all.keys(extendedKey); expect(requestBody.triggerEvent).to.equal(constants.EVENTS.AUCTION_INIT); + expect(requestBody.deviceWidth).to.equal(screen.width); + expect(requestBody.deviceHeight).to.equal(screen.height); expect(server.requests).to.have.length(1); expect(agmaAnalyticsAdapter.auctionIds).to.have.length(0); });