From 927d28a77d90acd8b23ef33935a839eee6417fbc Mon Sep 17 00:00:00 2001 From: asurovenko Date: Fri, 18 Feb 2022 22:22:21 +0600 Subject: [PATCH] zeta_global_sspBidAdapter: provide device.language --- modules/zeta_global_sspBidAdapter.js | 1 + test/spec/modules/zeta_global_sspBidAdapter_spec.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/modules/zeta_global_sspBidAdapter.js b/modules/zeta_global_sspBidAdapter.js index 77542252aeb..1407b92c481 100644 --- a/modules/zeta_global_sspBidAdapter.js +++ b/modules/zeta_global_sspBidAdapter.js @@ -108,6 +108,7 @@ export const spec = { payload.site.domain = config.getConfig('publisherDomain') || getDomainFromURL(payload.site.page); payload.device.ua = navigator.userAgent; + payload.device.language = navigator.language; payload.device.devicetype = isMobile() ? 1 : isConnectedTV() ? 3 : 2; payload.site.mobile = payload.device.devicetype === 1 ? 1 : 0; diff --git a/test/spec/modules/zeta_global_sspBidAdapter_spec.js b/test/spec/modules/zeta_global_sspBidAdapter_spec.js index 7d4a115958e..20113a63994 100644 --- a/test/spec/modules/zeta_global_sspBidAdapter_spec.js +++ b/test/spec/modules/zeta_global_sspBidAdapter_spec.js @@ -100,6 +100,13 @@ describe('Zeta Ssp Bid Adapter', function () { expect(payload.user.ext.eids).to.eql(eids); }); + it('Test contains ua and language', function () { + const request = spec.buildRequests(bannerRequest, bannerRequest[0]); + const payload = JSON.parse(request.data); + expect(payload.device.ua).to.not.be.empty; + expect(payload.device.language).to.not.be.empty; + }); + it('Test page and domain in site', function () { const request = spec.buildRequests(bannerRequest, bannerRequest[0]); const payload = JSON.parse(request.data);