diff --git a/modules/ixBidAdapter.js b/modules/ixBidAdapter.js index 0ec60b51ca2..163e3e2a2cd 100644 --- a/modules/ixBidAdapter.js +++ b/modules/ixBidAdapter.js @@ -1174,6 +1174,14 @@ function addFPD(bidderRequest, r, fpd, site, user) { if (!isEmpty(sua)) { deepSetValue(r, 'device.sua', sua); } + const ip = fpd.device.ip; + if (ip) { + deepSetValue(r, 'device.ip', ip); + } + const ipv6 = fpd.device.ipv6; + if (ipv6) { + deepSetValue(r, 'device.ipv6', ipv6); + } } // regulations from ortb2 diff --git a/test/spec/modules/ixBidAdapter_spec.js b/test/spec/modules/ixBidAdapter_spec.js index e0162617be3..e14e3922855 100644 --- a/test/spec/modules/ixBidAdapter_spec.js +++ b/test/spec/modules/ixBidAdapter_spec.js @@ -2510,6 +2510,19 @@ describe('IndexexchangeAdapter', function () { expect(payload.device.sua.mobile).to.equal(0) }); + it('should set device ip if available in fpd', function () { + const ortb2 = { + device: { + ip: '1.2.3.4', + ipv6: 'somefunkystring' + }}; + + const request = spec.buildRequests(DEFAULT_BANNER_VALID_BID, { ortb2 })[0]; + const payload = extractPayload(request); + expect(payload.device.ip).to.equal('1.2.3.4') + expect(payload.device.ipv6).to.equal('somefunkystring') + }); + it('should not set device sua if not available in fpd', function () { const ortb2 = { device: {}};