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

GDPR support #2601

Merged
merged 44 commits into from May 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8aa8f9c
Justpremium adapter and unit tests.
mkalafior May 24, 2017
00a2ce6
Fix test suit.
mkalafior May 24, 2017
0816e98
Performance improvements.
mkalafior Jun 6, 2017
6cc1617
Changes requested in pull request review.
mkalafior Jun 27, 2017
4917b85
Merge with upstream
mkalafior Jun 27, 2017
5fefb28
Register justpremium adapter in adaptermanager
mkalafior Jun 27, 2017
92da906
Merge remote-tracking branch 'upstream/master'
mkalafior Jul 3, 2017
83d5022
Merge branch 'master' of https://github.com/prebid/Prebid.js
mkalafior Jul 20, 2017
16a7b42
pass through bid from request
mkalafior Jul 20, 2017
b943b79
Merge branch 'master' of https://github.com/prebid/Prebid.js
mkalafior Aug 2, 2017
d8ddfd0
fix linting errors
mkalafior Aug 2, 2017
62438ed
merge
mkalafior Oct 12, 2017
d8e5cf8
Load polyfills for older browsers
mkalafior Oct 17, 2017
1eb433a
Merge remote-tracking branch 'upstream/master'
mkalafior Oct 17, 2017
97b0dd7
Merge branch 'master' into bugfix/ie-polyfills
mkalafior Oct 17, 2017
4683a30
Load polyfills if older browser
mkalafior Oct 17, 2017
ed9979e
Remove package-lock.json
mkalafior Oct 18, 2017
34ea947
Merge remote-tracking branch 'upstream/master'
mkalafior Nov 23, 2017
e28bc0f
Copy new Justpremium adapter from feature/1.0 branch
mkalafior Nov 23, 2017
16047de
#1881 Requested changes applied
mkalafior Nov 25, 2017
ec7a578
Merge remote-tracking branch 'upstream/master'
mkalafior Nov 29, 2017
291938e
#1892 Use `filter` instead `...new Set` to get unique values
mkalafior Nov 29, 2017
9de4f10
Merge remote-tracking branch 'upstream/master'
mkalafior Apr 3, 2018
8b0bd8c
Merge remote-tracking branch 'upstream/master'
mkalafior Apr 13, 2018
fa2fd0a
JSD-2248 update for adapter and tests
Apr 24, 2018
497e60b
JSD-2248 added transactionId in json array
Apr 24, 2018
829f7d3
JSD-2248 adapter changes
Apr 25, 2018
84c9627
JSD-2248 adapter changes
Apr 25, 2018
32d5064
Merge pull request #1 from mkalafior/feature/2.0
mkalafior May 1, 2018
ddad83b
Update docs
mkalafior May 1, 2018
0b069e0
Remove unnecessary return statement
mkalafior May 8, 2018
1a08a3c
Support for gdpr_consent in bid adapter
May 21, 2018
e470682
new cookie link and endpoint
May 21, 2018
fb8f017
back to old endpoint version
May 22, 2018
61109b7
sending version of prebid and adapter
May 22, 2018
9bd4d1a
sending version of prebid and adapter
May 22, 2018
a8c3e14
without version
May 23, 2018
cd81b65
Merge upstream
mkalafior May 23, 2018
0ed40ed
Merge branch 'master' into feature/gdpr
May 23, 2018
15804ce
Merge branch 'master' into feature/gdpr
nwlosinski May 23, 2018
c9f7c05
update for tests
May 23, 2018
10f1c95
changes for getUserSyncs method
May 23, 2018
85aa1f9
changes for getUserSyncs method
May 23, 2018
a1c2208
return gulpfile changes
May 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 16 additions & 4 deletions modules/justpremiumBidAdapter.js
Expand Up @@ -13,7 +13,7 @@ export const spec = {
return !!(bid && bid.params && bid.params.zone)
},

buildRequests: (validBidRequests) => {
buildRequests: (validBidRequests, bidderRequest) => {
const c = preparePubCond(validBidRequests)
const dim = getWebsiteDim()
const payload = {
Expand All @@ -38,6 +38,14 @@ export const spec = {
sizes[zone] = sizes[zone] || []
sizes[zone].push.apply(sizes[zone], b.sizes)
})

if (bidderRequest && bidderRequest.gdprConsent) {
payload.gdpr_consent = {
consent_string: bidderRequest.gdprConsent.consentString,
consent_required: (typeof bidderRequest.gdprConsent.gdprApplies === 'boolean') ? bidderRequest.gdprConsent.gdprApplies : true
};
}

const payloadString = JSON.stringify(payload)

return {
Expand Down Expand Up @@ -73,12 +81,16 @@ export const spec = {
return bidResponses
},

getUserSyncs: (syncOptions) => {
getUserSyncs: function getUserSyncs(syncOptions, responses, gdprConsent) {
let url = '//pre.ads.justpremium.com/v/1.0/t/sync'
if (gdprConsent && (typeof gdprConsent.gdprApplies === 'boolean')) {
url = url + '?consentString=' + encodeURIComponent(gdprConsent.consentString)
}
if (syncOptions.iframeEnabled) {
pixels.push({
type: 'iframe',
src: '//us-u.openx.net/w/1.0/pd?plm=10&ph=26e53f82-d199-49df-9eca-7b350c0f9646'
})
url: url
});
}
return pixels
}
Expand Down
2 changes: 1 addition & 1 deletion modules/justpremiumBidAdapter.md
Expand Up @@ -2,7 +2,7 @@

**Module Name**: Justpremium Bidder Adapter
**Module Type**: Bidder Adapter
**Maintainer**: info@justpremium.com
**Maintainer**: headerbidding-dev@justpremium.com

# Description

Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/justpremiumBidAdapter_spec.js
Expand Up @@ -121,7 +121,7 @@ describe('justpremium adapter', () => {
const options = spec.getUserSyncs({iframeEnabled: true})
expect(options).to.not.be.undefined
expect(options[0].type).to.equal('iframe')
expect(options[0].src).to.match(/\/\/us-u.openx.net\/w\/1.0/)
expect(options[0].url).to.match(/\/\/pre.ads.justpremium.com\/v\/1.0\/t\/sync/)
})
})
})