Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aab0156
raveltech bid adapter: imports the AppNexus adapter and encrypts the …
mnguyen-raveltech Jul 11, 2024
3faf9ea
1st version of the key information for the raveltech bid adapter
mnguyen-raveltech Jul 11, 2024
ad754b8
1st version of the unit test for the raveltech bid adapter
mnguyen-raveltech Jul 11, 2024
962e519
remove all functions that doesn't change compared to the Appnexus ada…
mnguyen-raveltech Jul 15, 2024
ac96087
add logs
mnguyen-raveltech Jul 15, 2024
0009fd8
Revert "remove all functions that doesn't change compared to the Appn…
mnguyen-raveltech Jul 15, 2024
bab3139
remove unnecessary functions, preventing duplicate
mnguyen-raveltech Jul 15, 2024
a9af496
clean logs
mnguyen-raveltech Jul 16, 2024
ba6be23
update of bidRequests to include UIDs + logs
mnguyen-raveltech Jul 16, 2024
8815826
update assertion in anonymization unit test
mnguyen-raveltech Jul 17, 2024
4de13aa
add import to fix warnings about BidRequest and Bid
mnguyen-raveltech Jul 22, 2024
29e817d
1st push of raveltechRtdProvider.md (doc for the raveltechRtdProvider…
mnguyen-raveltech Mar 5, 2025
a8b4cd9
remove the raveltechBidAdapter as we're now going with the RTD approa…
mnguyen-raveltech Mar 5, 2025
89b366a
1st push of raveltechRtdProvider.js
mnguyen-raveltech Mar 5, 2025
c4cfb59
1st push of raveltechRtdProvider_spec.js
mnguyen-raveltech Mar 5, 2025
26d9822
Revert "remove the raveltechBidAdapter as we're now going with the RT…
mnguyen-raveltech Mar 5, 2025
cfacf9e
remove the raveltechBidAdapter as we're now going with the RTD approa…
mnguyen-raveltech Mar 5, 2025
aeace1e
fix for "72:7 error Expected an assignment or function call and ins…
mnguyen-raveltech Mar 6, 2025
f43534e
add missing blank line at the end of the file
mnguyen-raveltech Mar 6, 2025
6589a94
prevents bid requests to be sent whenever zkad.js is not loaded
mnguyen-raveltech Mar 13, 2025
2d4443f
add log whenever there's an error in uid anonymization
mnguyen-raveltech Mar 13, 2025
66ec3f8
update markdown with instructions on how to load zkad.js
mnguyen-raveltech Mar 13, 2025
899b258
fix lint error with trailing space
mnguyen-raveltech Mar 13, 2025
32646c4
fix unit tests
mnguyen-raveltech Apr 16, 2025
40dc7c4
usage example for the raveltechRtdProvider module
mnguyen-raveltech Apr 17, 2025
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
379 changes: 379 additions & 0 deletions integrationExamples/gpt/raveltechRtdProvider_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,379 @@
<!-- each id module, for it to work, needs to be embedded in prebid.js bundle -->
<!-- see https://docs.prebid.org/dev-docs/modules/userId.html -->

<!-- for publisher to provide their own IDs, they can use the pubProvidedIdSystem module -->
<!-- see https://docs.prebid.org/dev-docs/modules/userid-submodules/pubprovided.html -->

<!-- this file can be tested with -->
<!-- gulp serve --notest --modules=rtdModule,raveltechRtdProvider,appnexusBidAdapter,userId -->

<!DOCTYPE html>
<html lang="en">

<head>
<title>User ID Modules Example</title>

<script>
var FAILSAFE_TIMEOUT = 2000;

var adUnits = [
{
code: 'test-div',
mediaTypes: {
banner: {
sizes: [[300, 250], [300, 600], [728, 90]]
}
},
bids: [
{
bidder: 'appnexus',
params: {
placementId: 234234,
}
}
]
}
];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
</script>
<script async src="https://cdn.rvlproxy.net/latest/zkad.js"></script>
<script async src="../../build/dev/prebid.js"></script>

<script>
function getHashedEmail() { }
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function () {
pbjs.setConfig({
"debug": true,

"realTimeData": {
dataProviders: [{
name: 'raveltech',
params: {
bidders: ['appnexus'],
// Set to true if you want to keep the original bid request along with the RTD‐modified one.
preserveOriginalBid: false
}
}]
},

// *************************************************************************
// ** COMMENT consentManagement BLOCK IF YOU DO NOT WANT TO SIMULATE GDPR **
// *************************************************************************
"consentManagement": {
"cmpApi": "static",
"consentData": {
"getTCData": {
"tcString": "CO-HDlqO-HDlqAKAXCENBDCsAP_AAH_AACiQHKNd_X_fb39j-_59_9t0eY1f9_7_v20zjgeds-8Nyd_X_L8X42M7vF36pq4KuR4Eu3LBIQFlHOHcTUmw6IkVqTPsak2Mr7NKJ7PEinMbe2dYGHtfn9VTuZKYr97s___z__-__v__75f_r-3_3_vp9V---_fA5QAkw1L4CLMSxwJJo0qhRAhCuJDoAQAUUIwtE1hASuCnZXAR-ggYAIDUBGBECDEFGLIIAAAAAkoiAkAPBAIgCIBAACAFSAhAARoAgsAJAwCAAUA0LACKAIQJCDI4KjlMCAiRaKCeSMASi72MMIQyigBoFH4AAAAA.cAAAAAAAAAAA",
"cmpId": 10,
"cmpVersion": 23,
"tcfPolicyVersion": 2,
"gdprApplies": true,
"cmpStatus": "loaded",
"eventStatus": "tcloaded",
"purpose": {
"consents": {
"1": true,
"2": true
}
},
"vendor": {
"consents": {
// add your GVL ID here and set to true to give consent within pbjs
"52": true, // rubicon for adserving
"21": true, // unifiedId
"131": true, // id5Id
"929": true, // parrableId
"97": true, // identityLink
"887": true, // uid2
"95": true, // lotamePanoramaId
"301": true, // zeotapIdPlus
"91": true, // criteo
"737": true, // amxId
"58": true, // 33acrossId
"32": true, // Appnexus (as well as for raveltech)
}
}
}
}
},
"userSync": {
"userIds": [
{
"name": "pubProvidedId",
"params": {
"eids": [
{
"source": "adnxs.com",
"uids": [
{
"id": "123456",
"atype": 1,
"ext": {
"stype": "ppuid" // allowable options are sha256email, DMP, ppuid for now
}
}
]
},
{
"source": "weborama_fr",
"uids": [
{
"id": "654321",
"atype": 1,
"ext": {
"stype": "ppuid" // allowable options are sha256email, DMP, ppuid for now
}
}
]
},

],
"eidsFunction": getHashedEmail // any user defined function that exists in the page
}
},
{
"name": "unifiedId",
"params": {
"partner": "prebid",
"url": "http://match.adsrvr.org/track/rid?ttd_pid=prebid&fmt=json"
},
"storage": {
"type": "html5",
"name": "unifiedid",
"expires": 30
}
},
{
"name": "33acrossId",
"params": {
"pid": '0'
},
"storage": {
"type": 'html5',
"name": '33acrossId',
"expires": 90
}
},
{
"name": "intentIqId",
"params": {
"partner": 0 // Set your real IntentIQ partner ID here for production.
},
"storage": {
"type": "cookie",
"name": "intentIqId",
"expires": 30
}
},
{
"name": "id5Id",
"params": {
"partner": 173 // Set your real ID5 partner ID here for production, please ask for one at http://id5.io/prebid
},
"storage": {
"type": "html5",
"name": "id5id",
"expires": 90,
"refreshInSeconds": 10// 8*3600 // Refresh frequency of cookies
}
},
{
"name": "merkleId",
"params": {
"endpoint": "https://test_endpoint/",
"vendor": "sdfg",
"sv_cid": "dfg",
"sv_pubid": "xcv",
"sv_domain": "zxv"
},
"storage": {
"type": "html5",
"name": "merkleId",
"expires": 30
}
},
{
"name": "parrableId",
"params": {
// change to Parrable Partner Client ID(s) you received from the Parrable Partners you are using
"partner": "30182847-e426-4ff9-b2b5-9ca1324ea09b"
}
},
{
"name": "pubCommonId",
"storage": {
"type": "cookie",
"name": "pubcid",
"expires": 365
}
// value: {
// foo: '9879878907987',
// bar:'93939'
// }
},
{
"name": "identityLink",
"params": {
"pid": "14" // Set your real identityLink placement ID here
// use3P: false // true/false - If you want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will not be fired. By default this property is undefined and 3p request will not be fired.
},
"storage": {
"type": "cookie",
"name": "idl_env",
"expires": 30
}
},
{
"name": "lotamePanoramaId"
},
{
"name": "liveIntentId",
"params": {
"publisherId": "9896876"
},
"storage": {
"type": "cookie",
"name": "_li_pbid",
"expires": 28
}
},
{
"name": "zeotapIdPlus"
},
{
"name": "hadronId",
"storage": {
"type": "cookie",
"name": "hadronId",
"expires": 28
}
},
{
"name": "quantcastId"
},
{
"name": "criteo"
},
{
"name": "amxId",
"storage": {
"type": "html5",
"name": "amxId",
"expires": 14
}
},
{
"name": "uid2",
"params": {
"uid2Token": {
"advertising_token": "example token",
"refresh_token": "aslkdjaslkjdaslkhj",
"identity_expires": Date.now() + 60*1000,
"refresh_from": Date.now() - 10*1000,
"refresh_expires": Date.now() + 12*60*60*1000,
"refresh_response_key": null
}
}
},
{
"name": "euid",
"params": {
"euidApiBase": "https://integ.euid.eu", // Omit this setting for production
"euidToken": {
"advertising_token": "advertising token goes here",
"refresh_token": "refresh token goes here",
"identity_expires": Date.now() + 60*1000, // These timestamps should be from the token generate response
"refresh_from": Date.now() - 10*1000,
"refresh_expires": Date.now() + 12*60*60*1000,
"refresh_response_key": "refresh key goes here"
}
}
},
{
"name": "imuid",
"params": {
"cid": 5126 // Set your Intimate Merger Customer ID here for production
}
},
{
"name": "dacId"
},
{
"name": "gravitompId"
}
],
"syncDelay": 5000,
"auctionDelay": 1000
}
});
pbjs.addAdUnits(adUnits);
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();
}, FAILSAFE_TIMEOUT);
</script>

<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
gads.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>

<script>
googletag.cmd.push(function () {
googletag.defineSlot('/112115922/FL_PB_MedRect', [[300, 250], [300, 600], [728, 90]], 'test-div').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h2>User ID Modules Example</h2>

<h4>Generated EIDs</h4>
<script>
pbjs.que.push(function () {
var idsDiv = document.getElementById('ids-div');
idsDiv.innerHTML = JSON.stringify(pbjs.getUserIdsAsEids(), null, ' ');
});
</script>
<pre id="ids-div" style="border:1px solid #333; padding:5px; overflow: scroll"></pre>

<h4>Ad Slot</h4>
<div id="test-div" style="border:1px solid #333; padding:5px;">
<script>
googletag.cmd.push(function () { googletag.display('test-div'); });
</script>
</div>
</body>

</html>
Loading