Skip to content

Commit

Permalink
Weborama RTD Module: add support to asset ids on contextual api (preb…
Browse files Browse the repository at this point in the history
…id#9086)

* format doc

* refacto configuration

* refactor module

* refactor code by change 3 constants to use one

* use single quote

* refactor profile validator

* refactor wrapping code

* improve type return

* update jsdoc, refactor some code

* refactor Object.keys

* update jsdoc

* refactor specific bidder code

* refactor jscode

* refactor jscode

* dont repeat yourself

* add more info in components

* convert to class

* move all code to private methods

* refactor into class with private methods

* remove global list of components

* update tests, refactor code

* finish refactor

* implement feature

* update doc

* fix doc

* update integration example

* add url parameter

* Update weboramaRtdProvider.md

Fix typo

* improve asset id handling

* adapt test to use webo_vctx when handle asset id

* fix observations from julien

* update fallback rules on contextual

* fix doc
  • Loading branch information
peczenyj authored and JacobKlein26 committed Feb 8, 2023
1 parent 987aabd commit 19b07b5
Show file tree
Hide file tree
Showing 4 changed files with 1,224 additions and 694 deletions.
61 changes: 10 additions & 51 deletions integrationExamples/gpt/weboramaRtdProvider_example.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>weborama rtd submodule example</title>
</head>

<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>weborama rtd submodule example</title>
</head>
<body>

<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
Expand All @@ -33,16 +30,19 @@
weboCtxConf: {
token: "to-be-defined", // mandatory
targetURL: "https://prebid.org", // default is document.URL
assetID: "token:identifier", // new parameter, overrides url
setPrebidTargeting: true, // override param.setPrebidTargeting or default true
sendToBidders: true, // override param.sendToBidders or default true
defaultProfile: { // optional
webo_ctx: ["Rugby_Renault_c11495", "Sport_c11893"],
webo_ds: ['bar']
},
baseURLProfileAPI: 'ctx-preprod.weborama.com',
// enabled: false,
//, onData: function (data,...) { ...}
},
weboUserDataConf: {
enabled: false,
accountId: 12345, // recommended
setPrebidTargeting: true, // override param.setPrebidTargeting or default true
sendToBidders: ['smartadserver'], // specify the bidder to share data
Expand All @@ -55,7 +55,7 @@
//, onData: function (data,...) { ...}
},
sfbxLiteDataConf: {
enabled: true,
enabled: false,
defaultProfile: { // optional
lite_occupation: ['gérant', 'bénévole'],
lite_hobbies: ['sport', 'cinéma'],
Expand Down Expand Up @@ -118,46 +118,6 @@
networkId: 456456,
},
}]
},
{
code: '/1056029/webo-wam-prebid',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'smartadserver',
params: {
siteId: 1234,
pageId: 1234,
formatId: 1234,
}
}, {
bidder: 'pubmatic',
params: {
publisherId: '32572',
}
}, {
bidder: 'appnexus',
params: {
placementId: 234234,
}
}, {
bidder: 'rubicon',
params: {
accountId: '14062',
siteId: '70608',
zoneId: '335918',
userId: '12346',
}
}, {
bidder: 'criteo',
params: {
zoneId: 234234,
networkId: 456456,
},
}]
}
];

Expand Down Expand Up @@ -197,7 +157,6 @@

googletag.cmd.push(function () {
googletag.defineSlot('/1056029/webo-ctx-prebid', div_1_sizes, 'div-gpt-ad-1620653642627-0').addService(googletag.pubads());
googletag.defineSlot('/1056029/webo-wam-prebid', div_2_sizes, 'div-gpt-ad-1645023761875-0').addService(googletag.pubads());
googletag.pubads().disableInitialLoad();
googletag.enableServices();
});
Expand Down
Loading

0 comments on commit 19b07b5

Please sign in to comment.