Skip to content

Commit

Permalink
PXYZ Bid Adapter : add GumGum iframe url to usersync list (#11280)
Browse files Browse the repository at this point in the history
* add advertiserDomain to bid object

* PGA-240 - Add gumgum iframe to usersync list

* PGA-240 - Update pxyz bid adapter test to include gumgum iframe url

* PGA-240 - Remove unused syncOptions variable

---------

Co-authored-by: jgan91 <jgan91@gmail.com>
Co-authored-by: Jonathan Mullins <jonathan.mullins@playgroundxyz.com>
Co-authored-by: Jonathan Mullins <mondojono@gmail.com>
  • Loading branch information
4 people authored Apr 4, 2024
1 parent f63b3ad commit 32e952c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
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);
});
})
});

0 comments on commit 32e952c

Please sign in to comment.