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 consentManagement module #2213

Merged
merged 52 commits into from
May 1, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bcf27d8
initial commit
jsnellbaker Feb 14, 2018
cda55fe
wip update 2
jsnellbaker Feb 15, 2018
77de2e5
wip update 3
jsnellbaker Feb 15, 2018
ebe1ee8
example
mkendall07 Feb 15, 2018
3cda142
clean up
mkendall07 Feb 15, 2018
6337a2e
wip update 3
jsnellbaker Feb 16, 2018
78f0e9c
hook setup for callBids
jsnellbaker Feb 16, 2018
2412b4f
wip update 4
jsnellbaker Feb 20, 2018
b8c1da6
changed gdpr code to be async-like
jsnellbaker Feb 20, 2018
173d945
cleaned up the callback chain
mkendall07 Feb 20, 2018
6f57a89
added iab cmp detection logic
jsnellbaker Feb 20, 2018
83a4ed9
Merge branch 'master' into gdpr
jsnellbaker Feb 21, 2018
2a587eb
moved hook, reverted unit test changes, and restructed gdpr module
jsnellbaker Feb 23, 2018
2018378
renaming module from gdpr to consentManagement
jsnellbaker Feb 26, 2018
0081610
prebidserver adatper update, additional changes in module
jsnellbaker Feb 28, 2018
a46ca14
updated unit tests for all areas, updates to module logic and structu…
jsnellbaker Mar 1, 2018
6739fd0
adding missing default value
jsnellbaker Mar 6, 2018
63d0d21
removing accidentally committed load time testing code
jsnellbaker Mar 6, 2018
effc19c
changes to layout of consentManagement code and other items based on …
jsnellbaker Mar 9, 2018
e6d8068
moved unit test to different location
jsnellbaker Mar 9, 2018
326e712
finished incomplete unit test in appnexusBidAdapter_spec file
jsnellbaker Mar 9, 2018
112a61b
altered CMP function call logic
jsnellbaker Mar 13, 2018
91b6d83
refactored consentManagement AN lookup function and added gdprDataHan…
jsnellbaker Mar 19, 2018
a425228
some minor cleanup from previous commit
jsnellbaker Mar 19, 2018
f273018
change spacing to try to fix travis issue
jsnellbaker Mar 19, 2018
2e465fd
added scenario to support consentTimeout=0 skip setTimeout
jsnellbaker Mar 22, 2018
540b4b5
updated some comments
jsnellbaker Mar 23, 2018
4de3df0
refactored exit logic for module
jsnellbaker Mar 23, 2018
7f78734
added support for consentRequired field in config
jsnellbaker Mar 27, 2018
d6a4807
merge master into gdpr; fixed conflicts
jsnellbaker Mar 28, 2018
8d23307
remove internal consentRequired default
jsnellbaker Mar 29, 2018
2ccfedf
minor comment fixes
jsnellbaker Apr 2, 2018
a96b129
comment fixes that should be have part of last commit
jsnellbaker Apr 2, 2018
b7811f8
Merge branch 'master' into gdpr
jsnellbaker Apr 12, 2018
9a1f09b
fix includes issue and added gdprConsent to getUserSyncs function
jsnellbaker Apr 12, 2018
73d02f0
Merge branch 'master' into gdpr
jsnellbaker Apr 12, 2018
5ae5eff
renamed default CMP and config field to cmpApi
jsnellbaker Apr 12, 2018
78fcc64
wip - using postmessage to call cmp
jsnellbaker Apr 13, 2018
c39b12d
postMessage workflow added, removed CMP eventlistener check
jsnellbaker Apr 13, 2018
213f2fa
removed if statement
jsnellbaker Apr 13, 2018
405a6f2
cleanup; removed variable and unneeded comments
jsnellbaker Apr 16, 2018
fc41a5a
add gdpr tests pages
jsnellbaker Apr 18, 2018
296e9ca
merge 'master' into branch 'gdpr' + resolve conflict
jsnellbaker Apr 18, 2018
750797a
updates for 1.1 CMP spec
jsnellbaker Apr 24, 2018
effa5b5
remove rogue debugger in unit test
jsnellbaker Apr 24, 2018
a3ca63f
restructured 1.1 CMP iframe code, renamed utils function, cleaned up …
jsnellbaker Apr 26, 2018
4bc0f9b
GDPR support in adform adapter (#2396)
Pupis Apr 27, 2018
4a6e273
merge branch 'master' into branch 'gdpr' + resolve conflicts
jsnellbaker Apr 27, 2018
2f32574
Add gdpr support for PubMaticBidAdapter (#2469)
PubMatic-OpenWrap Apr 30, 2018
f042d7c
GDPR support for AOL adapter (#2443)
vzhukovsky Apr 30, 2018
56f6df4
removing iframe example pages
jsnellbaker Apr 30, 2018
1a35235
comment updates
jsnellbaker Apr 30, 2018
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
211 changes: 102 additions & 109 deletions integrationExamples/gpt/gdpr_hello_world.html
Original file line number Diff line number Diff line change
@@ -1,110 +1,103 @@
<!--
This page calls a single bidder for a single ad slot. It can be considered a "hello world" example for using
Prebid with the Google Publisher Tag.
It also makes a good test page for new adapter PR submissions. Simply set your server's Bid Params object in the
bids array inside the adUnits, and it will use your adapter to load an ad.
NOTE that many ad servers won't send back an ad if the URL is localhost... so you might need to
set an alias in your /etc/hosts file so that you can load this page from a different domain.
-->

<html>
<head>
<script>
var PREBID_TIMEOUT = 700;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
sizes: [[300, 250], [300,600]],

// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexusAst',
params: {
placementId: '10433394'
}
}]

}];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

</script>

<script type="text/javascript" src="../../build/dev/prebid.js" async></script>
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.setConfig({
consentManagement: {
cmpApi: 'iab',
consentRequired: false,
timeout: 500,
allowAuctionWithoutConsent: true
},
pubcid: {
enable: false
},
debug: true
});
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}

// setTimeout(function() {
// sendAdserverRequest();
// }, PREBID_TIMEOUT);

</script>

<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>

<script>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h2>Prebid.js Test</h2>
<h5>Div-1</h5>
<div id='div-gpt-ad-1460505748561-0'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1460505748561-0'); });
</script>
</div>
</body>
<html>
<head>
<script>window.__cmp = {config: {logging: 'debug'}}</script>
<script src="//acdn.adnxs.com/cmp/cmp.complete.bundle.js" async></script>

<script>
var PREBID_TIMEOUT = 700;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
sizes: [[300, 250], [300,600]],

// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexusAst',
params: {
placementId: '10433394'
}
}]

}];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

</script>

<script type="text/javascript" src="../../build/dev/prebid.js" async></script>
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.setConfig({
consentManagement: {
cmpApi: 'iab',
timeout: 5000,
allowAuctionWithoutConsent: true
},
pubcid: {
enable: false
}
});
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}

// setTimeout(function() {
// sendAdserverRequest();
// console.log('timeout in main pbjs fired');
// }, PREBID_TIMEOUT);

</script>

<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>

<script>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h2>Prebid.js Test</h2>
<h5>Div-1</h5>
<div id='div-gpt-ad-1460505748561-0'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1460505748561-0'); });
</script>
</div>
</body>
</html>
Loading