-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Brainx Bid Adapter : initial release #12413
Conversation
modules/brainxBidAdapter.js
Outdated
data.user = { | ||
buyeruid: generateUUID() | ||
} | ||
data.device.ip = navigator.ip || '202.100.48.46'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this fallback lol :)
// console.log('bidRequests-==========', bidRequests); | ||
// console.log('bidderRequest-==========', bidderRequest); | ||
data.user = { | ||
buyeruid: generateUUID() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is odd, it will change every request
Our current processing is temporary, and the main purpose is to determine
what problems there are during the review process. Regarding the fixed
writing method, we are already adjusting it~
…On Wed, Nov 6, 2024 at 3:45 AM Patrick McCann ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In modules/brainxBidAdapter.js
<#12413 (comment)>:
> + }
+
+ if (!(bid.params.pubId)) {
+ logWarn('Invalid bid request - missing required field pubId');
+ return false;
+ }
+ return true;
+ },
+ buildRequests(bidRequests, bidderRequest) {
+ const data = converter.toORTB({ bidRequests, bidderRequest })
+ const device = config.getConfig('device') || {};
+ // console.log('data-==========', data);
+ // console.log('bidRequests-==========', bidRequests);
+ // console.log('bidderRequest-==========', bidderRequest);
+ data.user = {
+ buyeruid: generateUUID()
this is odd, it will change every request
—
Reply to this email directly, view it on GitHub
<#12413 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BMSAGRP6HWMJWANEFHZS73LZ7EN33AVCNFSM6AAAAABRF4SNH6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMJWGU2DOMJUGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
modules/brainxBidAdapter.js
Outdated
} | ||
return { | ||
method: METHOD, | ||
url: `${String(deepAccess(bidRequests[0], 'params.endpoint'))}?token=${String(deepAccess(bidRequests[0], 'params.pubId'))}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
endpoint cannot be a required parameter. It is incredibly awkward for publishers to have to enter a hostname on thousands of adunits when this is a global config.
It may be an optional parameter, but a default is required.
You may also ask the publisher to
pbjs.setConfig({
"brainx": {
"endpoint": "URL"
}
});
At least this is not then replicated thousands of times for each adunit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thank you for your reply. We will continue to make adjustments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, bretg, we have made adjustments to the above issues. Please review it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my review only covers that endpoint is no longer a required param
docs PR prebid/prebid.github.io#5689 |
Hi bretg, I was wondering when the next merge code will be released? |
@ChrisHuie - please assign this to someone for proper review. @Hugh0222 - sorry, we do not have a committed service-level agreement on how long it takes a pull request to get through review. It depends on the complexity and quality of the code as well as the availability of qualified reviewers. |
params: { | ||
placementId: 13144370 | ||
pubId: 'F7B53DBC-85C1-4685-9A06-9CF4B6261FA3' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove changes to this file in pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already restored
@@ -2,7 +2,7 @@ | |||
// creative will be rendered, e.g. GAM delivering a SafeFrame | |||
|
|||
// this code is autogenerated, also available in 'build/creative/creative.js' | |||
<script>!function(){"use strict";const e="Prebid Event",n=(()=>{const e={frameBorder:0,scrolling:"no",marginHeight:0,marginWidth:0,topMargin:0,leftMargin:0,allowTransparency:"true"};return(n,t)=>{const r=n.createElement("iframe");return Object.entries(Object.assign({},t,e)).forEach((([e,n])=>r.setAttribute(e,n))),r}})();function t(e){return!!e.frames.__pb_locator__}window.pbRender=function(r){let o=r.parent;try{for(;o!==r.top&&!t(o);)o=o.parent;t(o)||(o=r.parent)}catch(e){}return function({adId:t,pubUrl:s,clickUrl:i}){const c=new URL(s,window.location).origin;function a(e,n,r){const s=new MessageChannel;s.port1.onmessage=u(r),o.postMessage(JSON.stringify(Object.assign({message:e,adId:t},n)),c,[s.port2])}function d(n){a(e,{event:"adRenderFailed",info:{reason:n?.reason||"exception",message:n?.message}}),n?.stack&&console.error(n)}function u(e){return function(){try{return e.apply(this,arguments)}catch(e){d(e)}}}a("Prebid Request",{options:{clickUrl:i}},(function(o){let s;try{s=JSON.parse(o.data)}catch(e){return}if("Prebid Response"===s.message&&s.adId===t){const t=n(r.document,{width:0,height:0,style:"display: none",srcdoc:`<script>${s.renderer}<\/script>`});t.onload=u((function(){const o=t.contentWindow;o.Promise.resolve(o.render(s,{sendMessage:a,mkFrame:n},r)).then((()=>a(e,{event:"adRenderSucceeded"})),d)})),r.document.body.appendChild(t)}}))}}(window)}();</script> | |||
<script>(()=>{"use strict";const e="Prebid Event",n=(()=>{const e={frameBorder:0,scrolling:"no",marginHeight:0,marginWidth:0,topMargin:0,leftMargin:0,allowTransparency:"true"};return(n,t)=>{const r=n.createElement("iframe");return Object.entries(Object.assign({},t,e)).forEach((([e,n])=>r.setAttribute(e,n))),r}})();function t(e){return!!e.frames.__pb_locator__}window.pbRender=function(r){let o=r.parent;try{for(;o!==r.top&&!t(o);)o=o.parent;t(o)||(o=r.parent)}catch(e){}return function({adId:t,pubUrl:s,clickUrl:i}){const a=new URL(s,window.location).origin;function c(e,n,r){const s=new MessageChannel;s.port1.onmessage=l(r),o.postMessage(JSON.stringify(Object.assign({message:e,adId:t},n)),a,[s.port2])}function d(n){c(e,{event:"adRenderFailed",info:{reason:n?.reason||"exception",message:n?.message}}),n?.stack&&console.error(n)}function l(e){return function(){try{return e.apply(this,arguments)}catch(e){d(e)}}}c("Prebid Request",{options:{clickUrl:i}},(function(o){let s;try{s=JSON.parse(o.data)}catch(e){return}if("Prebid Response"===s.message&&s.adId===t){const t=n(r.document,{width:0,height:0,style:"display: none",srcdoc:`<script>${s.renderer}<\/script>`});t.onload=l((function(){const o=t.contentWindow;o.Promise.resolve(o.render(s,{sendMessage:c,mkFrame:n},r)).then((()=>c(e,{event:"adRenderSucceeded"})),d)})),r.document.body.appendChild(t)}}))}}(window)})();</script> | |||
|
|||
<script> | |||
pbRender({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove changes to this file in the pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already restored
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Other information