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

51Degrees RTD submodule: initial commit #11414

Merged
merged 24 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e243ff4
51Degrees RTD provider
BohdanVV Apr 26, 2024
c3b69ec
Amended comments and documentation to improve references for obtainin…
jwrosewell Apr 29, 2024
989a5ab
Modified the maintainer email address.
jwrosewell Apr 29, 2024
f50b14b
Change outdated URL
BohdanVV Apr 29, 2024
e0663e8
Adjust code to work on legacy browsers
BohdanVV Apr 29, 2024
45761cc
Refactor a test of the `inject` method
BohdanVV Apr 29, 2024
bd24631
Replace URL in a test method
BohdanVV Apr 29, 2024
d4d6f2c
51Degrees RTD provider: remove redundant parameter from the example
BohdanVV Apr 30, 2024
b7a4258
51Degrees RTD provider: update gpt.js URL in the example file
BohdanVV Apr 30, 2024
f11f87c
51Degrees RTD provider: add schema to the `is51DegreesMetaPresent` me…
BohdanVV Apr 30, 2024
818f343
51Degrees RTD provider: refactor `51Degrees` script injection method
BohdanVV Apr 30, 2024
8ecd4b8
51Degrees RTD provider: show enriched device data in the example page
BohdanVV May 2, 2024
76f6a3a
51Degrees RTD provider: provide additional explanation for checking m…
BohdanVV May 2, 2024
767ff78
51Degrees RTD provider: update string for meta tag check
BohdanVV May 2, 2024
0e7a79e
Merge branch 'master' into feature/51DegreesRtdProvider
BohdanVV May 2, 2024
798d59c
51Degrees RTD provider: improve tests, reach 100% tests coverage
BohdanVV May 2, 2024
af66b58
Merge branch 'prebid:master' into feature/51DegreesRtdProvider
BohdanVV May 2, 2024
aed54e9
Merge branch 'master' into feature/51DegreesRtdProvider
BohdanVV May 7, 2024
b5a679a
Merge branch 'feature/51DegreesRtdProvider-100-coverage' into feature…
BohdanVV May 7, 2024
e1d31a6
Merge branch 'master' into feature/51DegreesRtdProvider
BohdanVV May 8, 2024
75f9461
51d example: debug warning and guidance
justadreamer May 14, 2024
8f4ae8a
51d doc: add GetHighEntropyValues vs. Delegate-CH
justadreamer May 14, 2024
fb3d7e9
51d: fix minor doc omissions
justadreamer May 14, 2024
531deca
Merge pull request #2 from 51Degrees/feature/51DegreesRtdProvider-rev…
justadreamer May 15, 2024
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
168 changes: 168 additions & 0 deletions integrationExamples/gpt/51DegreesRtdProvider_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Delegate-CH" content="sec-ch-ua-full-version-list https://cloud.51degrees.com; sec-ch-ua-model https://cloud.51degrees.com; sec-ch-ua-platform https://cloud.51degrees.com; sec-ch-ua-platform-version https://cloud.51degrees.com">
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<script async src="../../build/dev/prebid.js"></script>
<meta charset="utf-8">
<style>
body {
color: #555;
font-family: sans-serif;
}
</style>
<script>
var PREBID_TIMEOUT = 1000;
var FAILSAFE_TIMEOUT = 3000;

var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];

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

function initAdserver() {
if (pbjs.initAdserverSet) return;

googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});

pbjs.initAdserverSet = true;
}

pbjs.que.push(function () {
var adUnits = [{
code: 'div-banner-native-1',
mediaTypes: {
banner: {
sizes: [
[300, 250]
]
},
native: {
type: 'image'
},
},
bids: [{
bidder: 'appnexus',
params: {
placementId: 13232392,
}
}]
},
{
code: 'div-banner-native-2',
mediaTypes: {
banner: {
sizes: [
[300, 250]
]
},
native: {
title: {
required: true
},
image: {
required: true
},
sponsoredBy: {
required: true
}
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: 13232392,
}
}]
}
];

pbjs.setConfig({
debug: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a tiny bit dangerous in an example; i would add a comment here to tell devs to be careful not to run debug in production

realTimeData: {
jwrosewell marked this conversation as resolved.
Show resolved Hide resolved
auctionDelay: 1000, // should be set lower in production use
dataProviders: [
{
name: '51Degrees',
waitForIt: true,
params: {
// Get your resource key from https://configure.51degrees.com/tWrhNfY6
resourceKey: '<YOUR_RESOURCE_KEY>',
// alternatively, you can use the on-premise version of the 51Degrees service and connect to your chosen end point
// onPremiseJSUrl: 'https://localhost/51Degrees.core.js'
}
}
]
},
});

pbjs.addAdUnits(adUnits);
pbjs.requestBids({
timeout: PREBID_TIMEOUT,
bidsBackHandler: function (bidResponses) {
initAdserver();
}
});
});
setTimeout(initAdserver, FAILSAFE_TIMEOUT);
</script>

<script>
googletag.cmd.push(function () {
googletag
.defineSlot(
'/19968336/prebid_multiformat_test', [
[300, 250],
[360, 360]
],
'div-banner-native-1'
)
.addService(googletag.pubads());

googletag
.defineSlot(
'/19968336/prebid_multiformat_test', [
[300, 250],
[360, 360]
],
'div-banner-native-2'
)
.addService(googletag.pubads());

googletag.pubads().disableInitialLoad();
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
<title>51Degrees RTD submodule example - Prebid.js</title>
</head>
<body>
<h2>51Degrees RTD submodule - example of usage</h2>

<h3>div-banner-native-1</h3>
<div id='div-banner-native-1'>
<p>No response</p>
<script type='text/javascript'>
googletag.cmd.push(function () {
googletag.display('div-banner-native-1');
});
</script>
</div>

<h3>div-banner-native-2</h3>
<div id='div-banner-native-2'>
<p>No response</p>
<script type='text/javascript'>
googletag.cmd.push(function () {
googletag.display('div-banner-native-2');
});
</script>
</div>
</body>
</html>
Loading