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

Emx Digital Bid Adapter : adding US Privacy string support #9461

Merged
merged 45 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e7cb062
adding ccpa support for emx_digital adapter
Dec 9, 2019
5c0cfc1
emx_digital ccpa compliance: lint fix
Dec 10, 2019
4c0a008
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 17, 2019
676b419
emx 3.0 compliance update
Dec 17, 2019
36524b3
Merge branch 'master' of https://github.com/prebid/Prebid.js
ncolletti Jan 29, 2020
ec9f12f
Merge remote-tracking branch 'upstream/master'
Apr 22, 2020
9d96181
fix outstream renderer issue, update test spec
Apr 22, 2020
7a5fad2
sync with upstream
Apr 23, 2020
de685c9
Merge branch 'bug/EI-34'
Apr 23, 2020
b2d22a3
refactor formatVideoResponse function to use core-js/find
Apr 29, 2020
5b54a8c
Merge remote-tracking branch 'upstream/master'
DBogdanEMX Aug 15, 2020
29b8d20
Merge remote-tracking branch 'upstream/master'
Nov 9, 2020
aba7bb5
Merge remote-tracking branch 'upstream/master' into add_schain_forwar…
Nov 9, 2020
9be10ca
Add support for schain forwarding
Nov 9, 2020
080b2c7
Merge branch 'add_schain_forwarding'
Nov 9, 2020
09ec591
Merge remote-tracking branch 'upstream/master'
Nov 20, 2020
558a791
Resolved issue with Schain object location
Nov 20, 2020
734a72b
Merge remote-tracking branch 'upstream/master'
Dec 3, 2020
c33a070
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Dec 15, 2020
6a06e18
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jan 19, 2021
b22ed51
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 May 10, 2021
9f235e7
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 May 11, 2021
ab197dc
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 May 12, 2021
fc0ab49
prebid 5.0 floor module and advertiserDomain support
rakeshbalakrishnan28 May 19, 2021
372e1bb
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 May 20, 2021
08dc8e2
Merge remote-tracking branch 'origin/prebid-5.0-support'
rakeshbalakrishnan28 May 20, 2021
6c943ef
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jun 21, 2021
993346e
liveramp idl and uid2.0 support for prebid
rakeshbalakrishnan28 Jun 24, 2021
5d71941
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jul 1, 2021
f96690e
Merge pull request #2 from EMXDigital/liveramp_uid2_sidecar_support
EMXDigital Jul 1, 2021
e153e25
sync with upstream
Nov 16, 2021
a77f39e
gpid support
Nov 16, 2021
fd0b36c
remove utils ext
Nov 16, 2021
9c73f63
remove empty line
Nov 16, 2021
2bc9b4f
remove trailing spaces
Nov 16, 2021
fab9c22
move gpid test module
Nov 16, 2021
811e24f
move gpid test module
Nov 16, 2021
0716d9c
removing trailing spaces from unit test
Nov 16, 2021
1befe07
remove comments from unit test
Nov 16, 2021
d78d151
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jun 1, 2022
f1841a7
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jun 2, 2022
5e6c9a8
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Sep 19, 2022
68bf7e7
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jan 24, 2023
a1ef53e
Include us_privacy string in redirects (#8)
EMXDigital Jan 24, 2023
48d573f
kick off ci tests
ChrisHuie Jan 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions modules/emx_digitalBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,16 +354,23 @@ export const spec = {
},
getUserSyncs: function (syncOptions, responses, gdprConsent, uspConsent) {
const syncs = [];
const consentParams = [];
if (syncOptions.iframeEnabled) {
let url = 'https://biddr.brealtime.com/check.html';
if (gdprConsent && typeof gdprConsent.consentString === 'string') {
// add 'gdpr' only if 'gdprApplies' is defined
if (typeof gdprConsent.gdprApplies === 'boolean') {
url += `?gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`;
consentParams.push(`gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`);
} else {
url += `?gdpr_consent=${gdprConsent.consentString}`;
consentParams.push(`?gdpr_consent=${gdprConsent.consentString}`);
}
}
if (uspConsent && typeof uspConsent.consentString === 'string') {
consentParams.push(`usp=${uspConsent.consentString}`);
}
if (consentParams.length > 0) {
url = url + '?' + consentParams.join('&');
}
syncs.push({
type: 'iframe',
url: url
Expand Down
31 changes: 30 additions & 1 deletion test/spec/modules/emx_digitalBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ describe('emx_digital Adapter', function () {
}));
});

it('returns valid advertiser domain', function () {
it('returns valid advertiser domains', function () {
const bidResponse = utils.deepClone(serverResponse);
let result = spec.interpretResponse({body: bidResponse});
expect(result[0].meta.advertiserDomains).to.deep.equal(expectedResponse[0].meta.advertiserDomains);
Expand All @@ -724,6 +724,7 @@ describe('emx_digital Adapter', function () {
expect(syncs).to.not.be.an('undefined');
expect(syncs).to.have.lengthOf(1);
expect(syncs[0].type).to.equal('iframe');
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html')
});

it('should pass gdpr params', function () {
Expand All @@ -734,6 +735,34 @@ describe('emx_digital Adapter', function () {
expect(syncs).to.have.lengthOf(1);
expect(syncs[0].type).to.equal('iframe');
expect(syncs[0].url).to.contains('gdpr=0');
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=0&gdpr_consent=test')
});

it('should pass us_privacy string', function () {
let syncs = spec.getUserSyncs({ iframeEnabled: true }, {}, {}, {
consentString: 'test',
});
expect(syncs).to.not.be.an('undefined');
expect(syncs).to.have.lengthOf(1);
expect(syncs[0].type).to.equal('iframe');
expect(syncs[0].url).to.contains('usp=test');
});

it('should pass us_privacy and gdpr strings', function () {
let syncs = spec.getUserSyncs({ iframeEnabled: true }, {},
{
gdprApplies: true,
consentString: 'test'
},
{
consentString: 'test'
});
expect(syncs).to.not.be.an('undefined');
expect(syncs).to.have.lengthOf(1);
expect(syncs[0].type).to.equal('iframe');
expect(syncs[0].url).to.contains('gdpr=1');
expect(syncs[0].url).to.contains('usp=test');
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=1&gdpr_consent=test&usp=test')
});
});
});