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

PXYZ Bid Adapter : add GumGum iframe url to usersync list #11280

Merged
merged 7 commits into from
Apr 4, 2024
5 changes: 4 additions & 1 deletion modules/pxyzBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ export const spec = {
return bids;
},

getUserSyncs: function (syncOptions) {
getUserSyncs: function () {
return [{
type: 'image',
url: '//ib.adnxs.com/getuidnb?https://ads.playground.xyz/usersync?partner=appnexus&uid=$UID'
}, {
type: 'iframe',
url: '//rtb.gumgum.com/getuid/15801?r=https%3A%2F%2Fads.playground.xyz%2Fusersync%3Fpartner%3Dgumgum%26uid%3D'
}];
}
}
Expand Down
33 changes: 9 additions & 24 deletions test/spec/modules/pxyzBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,30 +210,15 @@ describe('pxyzBidAdapter', function () {
});

describe('getUserSyncs', function () {
const syncUrl = '//ib.adnxs.com/getuidnb?https://ads.playground.xyz/usersync?partner=appnexus&uid=$UID';

describe('when iframeEnabled is true', function () {
const syncOptions = {
'iframeEnabled': true
}
it('should return one image type user sync pixel', function () {
let result = spec.getUserSyncs(syncOptions);
expect(result.length).to.equal(1);
expect(result[0].type).to.equal('image')
expect(result[0].url).to.equal(syncUrl);
});
});

describe('when iframeEnabled is false', function () {
const syncOptions = {
'iframeEnabled': false
}
it('should return one image type user sync pixel', function () {
let result = spec.getUserSyncs(syncOptions);
expect(result.length).to.equal(1);
expect(result[0].type).to.equal('image')
expect(result[0].url).to.equal(syncUrl);
});
const syncImageUrl = '//ib.adnxs.com/getuidnb?https://ads.playground.xyz/usersync?partner=appnexus&uid=$UID';
const syncIframeUrl = '//rtb.gumgum.com/getuid/15801?r=https%3A%2F%2Fads.playground.xyz%2Fusersync%3Fpartner%3Dgumgum%26uid%3D';
it('should return one image type user sync pixel', function () {
let result = spec.getUserSyncs();
expect(result.length).to.equal(2);
expect(result[0].type).to.equal('image')
expect(result[0].url).to.equal(syncImageUrl);
expect(result[1].type).to.equal('iframe')
expect(result[1].url).to.equal(syncIframeUrl);
});
})
});