Skip to content

Commit

Permalink
main>modules\neuwoRtdProvider.js > apiUrl format handling improved, r…
Browse files Browse the repository at this point in the history
…emoved unnecessary parameter integrationExamples\gpt\neuwoRtdProvider_example.html > fixed render-step handling on warning (#9646)
  • Loading branch information
moquity authored Mar 9, 2023
1 parent 9de8066 commit f16de3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions integrationExamples/gpt/neuwoRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<script src="../../build/dev/prebid.js" async type="text/javascript"></script>
<script async src="//www.googletagservices.com/tag/js/gpt.js"></script>
<script>
var helper = document.getElementById('need-help');
if (helper) helper.style.display = location.href !== 'http://localhost:9999/integrationExamples/gpt/neuwoRtdProvider_example.html' ? 'block' : 'none';

/* adapted from https://docs.prebid.org/dev-docs/examples/basic-example.html */
var div_1_sizes = [
[300, 250],
Expand Down Expand Up @@ -197,4 +194,8 @@ <h5>Div-2</h5>
</div>

</body>
<script type="text/javascript">
var helper = document.getElementById('need-help');
if (helper) helper.style.display = location.href !== 'http://localhost:9999/integrationExamples/gpt/neuwoRtdProvider_example.html' ? 'block' : 'none';
</script>
</html>
5 changes: 3 additions & 2 deletions modules/neuwoRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ export function getBidRequestData(reqBidsConfigObj, callback, config, userConsen
logInfo('NeuwoRTDModule', 'starting getBidRequestData')

const wrappedArgUrl = encodeURIComponent(config.params.argUrl || getRefererInfo().page);
const url = config.params.apiUrl + [
/* adjust for pages api.url?prefix=test (to add params with '&') as well as api.url (to add params with '?') */
const joiner = config.params.apiUrl.indexOf('?') < 0 ? '?' : '&'
const url = config.params.apiUrl + joiner + [
'token=' + config.params.publicToken,
'lang=en',
'url=' + wrappedArgUrl
].join('&')
const billingId = generateUUID();
Expand Down

0 comments on commit f16de3f

Please sign in to comment.