-
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
New adfinity adapter #4591
New adfinity adapter #4591
Conversation
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.
Thanks for submitting this adapter. Overall everything seems okay, there are a few points that need to be addressed.
- It seems that the response (for the test banner at least) was not gzip encoded. Can you please make this update?
- Are there any sample test params for video and native? If you're going to support these formats, I'd like to test them out through the adapter to ensure the end-to-end workflow is working as expected.
Thanks!
modules/adfinityBidAdapter.md
Outdated
} | ||
}, | ||
bids: [{ | ||
bidder: 'afinity', |
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.
small typo in the bidder name here. Should be adfinity
as per the BIDDER_CODE
in the .js file.
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.
I've added test params for video and native into .md file. For testing just change traffic type.
About gzip, is this mandatory in current release?
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.
Thanks for updating the test params, I'll take a look.
The compression of the response is required; this can be done with gzip
or other similar settings in the content-encoding
param (such as deflate
or compress
, if those are more preferable).
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.
I ran some tests on the video and native params and have some additional feedback. Can you take a look when you get the chance?
modules/adfinityBidAdapter.md
Outdated
} | ||
}, | ||
{ | ||
bidder: 'afinity', |
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.
Looks like the typo cropped up again. :) Can you update these two references?
modules/adfinityBidAdapter.md
Outdated
} | ||
}, | ||
{ | ||
bidder: 'afinity', |
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.
See above.
modules/adfinityBidAdapter.md
Outdated
{ | ||
bidder: 'afinity', | ||
params: { | ||
placement_id: 0, | ||
traffic: 'video' | ||
} | ||
}, | ||
{ | ||
bidder: 'afinity', | ||
params: { | ||
placement_id: 0, | ||
traffic: 'native' | ||
} | ||
} |
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.
Can you restructure these test params into separate adUnits with their own mediaTypes
? I assume you're supporting instream
video only? I can't really confirm.
The same applies to native
, in terms of which assets you support.
let resItem = serverResponse[i]; | ||
if (isBidResponseValid(resItem)) { | ||
response.push(resItem); | ||
} |
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 current code doesn't really support native bids, at least based on the test native params that were provided.
When creating a native
bid for Prebid, there are certain fields that need to be defined to properly identify all the normal native assets (which are used in the rendering process). Can you update the logic here to add this support?
The following page provides some additional information if needed:
http://prebid.org/dev-docs/bidder-adaptor.html#supporting-native
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, help me to understend, what prebid adapter shoukd get in response from SSP, currently, using test params we return such object
{ mediaType: 'native', native:{ clickUrl: "", title: 'Test', image: { url: '', width: 226, height: 158 }, impressionTrackers: [] }, ttl: 120, cpm: 0.4, requestId: placement['bidId'], creativeId: '2', netRevenue: true, currency: 'USD', dealId: '1' }
This response contains minimal data to render native ad: clickUrl, impTrackers, image and title. This should be enough to test integration. To apply assets, our users stores them into ssp user UI
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.
So on the whole, that list you provided should be sufficient in the minimal terms. If you're not going to add the code in the adapter to set the values for the bidResponse
, you'll have to ensure any other potential native assets that may be used are setup properly in the SSP response that your endpoint returns.
If the values aren't formatted correctly, there's a chance that Prebid will reject that native bid as not being setup properly. Please let me know if that makes sense.
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.
Building response to Prebid adapter on backend side i'm using construction to set prebid assets
like this:
if (asset.data) { switch (asset.data.type) { case 1: hbResponse.sponsoredBy = asset.data.value; break; case 2: hbResponse.body = asset.data.value; break; case 3: hbResponse.rating = asset.data.value; break; case 4: hbResponse.likes = asset.data.value; break; case 5: hbResponse.downloads = asset.data.value; break; case 6: hbResponse.price = asset.data.value; break; case 7: hbResponse.salePrice = asset.data.value; break; case 8: hbResponse.phone = asset.data.value; break; case 9: hbResponse.address = asset.data.value; break; case 10: hbResponse.body2 = asset.data.value; break; case 11: hbResponse.displayUrl = asset.data.value; break; case 12: hbResponse.cta = asset.data.value; break; default: hbResponse.body = asset.data.value; } } else if (asset.img) { switch (asset.img.type) { case 2: hbResponse.icon = { url: asset.img.url, width: asset.img.w, height: asset.img.h }; break; case 3: hbResponse.image = { url: asset.img.url, width: asset.img.w, height: asset.img.h }; break; default: hbResponse.image = { url: asset.img.url, width: asset.img.w, height: asset.img.h }; } }
Hi @adfinity-prebid Below is a copy of the error for reference:
|
Thanks, i've fixed this one. For soe reason, whe i'm running ✖ 1 problem (1 error, 0 warnings) [10:32:06] 'lint' errored after 21 s [10:32:06] 'test' errored after 21 s` |
@adfinity-prebid You may want to try and reinstall the npm packages for your local copy of prebid.js. It looks like the package is missing. Can you give this a try? |
Yep, this worked. For now output looks good START: Finished in 5.805 secs / 3.195 secs @ 10:15:58 GMT+0200 (Eastern European Standard Time) SUMMARY: |
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.
@adfinity-prebid
Thanks for the update. LGTM
…idVersion1.2.0 * 'master' of https://github.com/prebid/Prebid.js: New adfinity adapter (prebid#4591) add segmento bid adapter (prebid#4660) ozone 2.2.0 adapter updates (prebid#4676)
* New adfinity adapter * Update adfinityBidAdapter.md * add test params * native response validattion * fix secure param Co-authored-by: Check your git settings! <chris@chris-laptop>
Type of change
contact email of the adapter’s maintainer
adfinity_prebid@i.ua
official adapter submission
A link to a PR on the docs repo at https://github.com/prebid/prebid.github.io/
New Adfinity adpter prebid.github.io#1684