Closed anwzhang closed 4 years ago
Open questions:
Should we only use version 1.1 or 1.2? The difference is that for 1.2, AppNexus require request to include event trackers:
Can you provide a better spec of how this would work, meaning the components of how this would flow from the API of the SDK (that you have outlined) to the Prebid Sever communication part, expected request and response values. It's also not clear what would be different in Native 1.1 version 1.2.
Should we pass a PrebidCache id for native assets for PUC to parse, or pass directly on the requesti with native assets (need to test keyword length limitation with imp trackers)?
Prebid SDK today only supports calling the cache server. We would have to modify the PUC if we were add support of not calling cache server for native.
We should really have a conversation about the timelines and design. In the next release after Prebid SDK 1.2, we are building support for video and are seeking modularize the SDK into feature / format components. That could impact how you are building. Ideally our product builds are in sync.
Hi @bszekely1 ,
Here's a sample ORTB request for native:
{
"id": "3dc76667-a500-4e01-a43b-368e36d6c7cc",
"source": {
"tid": "3dc76667-a500-4e01-a43b-368e36d6c7cc"
},
"imp": [
{
"id": "Banner_300x250",
"ext": {
"prebid": {
"storedrequest": {
"id": "25e17008-5081-4676-94d5-923ced4359d3"
}
}
},
"native": {
"request": "{\"ver\":\"1.1\",\"context\":2,\"contextsubtype\":20,\"plcmttype\":1,\"assets\":[{\"required\":1,\"title\":{\"len\":90}},{\"required\":1,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200}},{\"required\":1,\"data\":{\"type\":1,\"len\":25}}]}",
"ver": "1.1"
}
}
],
"device": {
"make": "unknown",
"model": "Android SDK built for x86",
"ua": "Mozilla/5.0 (Linux; Android 6.0; Android SDK built for x86 Build/MASTER; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36",
"w": 360,
"h": 568,
"pxratio": 3,
"mccmnc": "310-260",
"carrier": "Android",
"connectiontype": 2,
"lmt": 0,
"ifa": "baa7acdc-b7de-48c2-91f7-d0343a74ae68",
"os": "android",
"osv": "23",
"language": "en",
"ip": "207.237.150.246"
},
"app": {
"bundle": "org.prebid.mobile.demoapp",
"ver": "0.3",
"name": "DemoApp",
"privacypolicy": 0,
"publisher": {
"id": "bfa84af2-bd16-4d35-96ad-31c6bb888df0"
},
"ext": {
"prebid": {
"source": "prebid-mobile",
"version": "0.3"
}
}
},
"user": {
"yob": 1992,
"gender": "F",
"keywords": "PrebidKey=PrebidValue,PrebidKey2,"
},
"regs": {
"ext": {}
},
"ext": {
"prebid": {
"storedrequest": {
"id": "bfa84af2-bd16-4d35-96ad-31c6bb888df0"
},
"cache": {
"bids": {}
}
}
}
}
Cached response will be as following:
{
"assets": [
{
"id": 1,
"img": {
"url": "https://vcdn.adnxs.com/p/creative-image/7e/71/90/27/7e719027-80ef-4664-9b6d-a763da4cea4e.png",
"w": 300,
"h": 250,
"ext": {
"appnexus": {
"prevent_crop": 0
}
}
}
},
{
"id": 0,
"title": {
"text": "This is an RTB ad"
}
},
{
"id": 2,
"data": {
"value": "AppNexus"
}
}
],
"link": {
"url": "https://nym1-ib.adnxs.com/click?exSuR-F6hD97FK5H4XqEPwAAAAAAAAAAexSuR-F6hD97FK5H4XqEPzjJ3fTMleMehvxebRKgw28tzE1dAAAAAHu99gBuJwAAbicAAAIAAACRL6wJ-MwcAAAAAABVU0QAVVNEAAEAAQDILwAAAAABAgMCAAAAAMYA3yNIVAAAAAA./bcr=AAAAAAAA8D8=/pp=${AUCTION_PRICE}/cnd=%21AxLW5Aimo8AOEJHfsE0Y-JlzIAQoADF7FK5H4XqEPzoJTllNMjo0NjIyQJUQSQAAAAAAAPA_UQAAAAAAAAAAWQAAAAAAAAAAYQAAAAAAAAAAaQAAAAAAAAAAcQAAAAAAAAAAeAA./cca=MTAwOTQjTllNMjo0NjIy/bn=77812/clickenc=http%3A%2F%2Fappnexus.com"
},
"imptrackers": [
"https://nym1-ib.adnxs.com/it?an_audit=0&e=wqT_3QKpCOgpBAAAAwDWAAUBCK2Yt-oFELiS96bPueXxHhiG-fvqpoLo4W8qNgl7FK5H4XqEPxF7FK5H4XqEPxkAAAkCACERGwApEQkAMQkZsAAAMPv62gc47k5A7k5IAlCR37BNWPiZc2AAaM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ADYBQHgBQHwBQH6BQQIABAAkAYBmAYAuAYAwQZpnzTwP8gGANAG1jPaBhYKEAkUGQFEEAAYAOAGDPIGAggAgAcBiAcA&s=22a3ef24348db8bef73dbc632c545607e28669d3&pp=${AUCTION_PRICE}"
],
"jstracker": "<script type=\"text/javascript\" async=\"true\" src=\"https://cdn.adnxs.com/v/app/173/trk.js#app;vk=appnexus.com-omid;tv=app-native-23hs;dom_id=%native_dom_id%;st=2;d=1x1;vc=iab;vid_ccr=1;tag_id=16170363;cb=https%3A%2F%2Fnym1-ib.adnxs.com%2Fvevent%3Fan_audit%3D0%26e%3DwqT_3QKpCOgpBAAAAwDWAAUBCK2Yt-oFELiS96bPueXxHhiG-fvqpoLo4W8qNgl7FK5H4XqEPxF7FK5H4XqEPxkAAAkCACERGwApEQkAMQkZsAAAMPv62gc47k5A7k5IAlCR37BNWPiZc2AAaMjfjAF49N8EgAEBigEDVVNEkgUG8FWYAQGgAQGoAQGwAQC4AQLAAQPIAQLQAQLYARvgAQDwAQCKAjx1ZignYScsIDMzOTM1MjAsIDE1NjUzNzk2MjkpO3VmKCdyJywgMTYyMjc5MzEzLCAxNRkf8LCSArECIXJVQ2FEUWltbzhBT0VKSGZzRTBZQUNENG1YTXdBRGdBUUFSSTdrNVEtX3JhQjFnQVlPNEdhQUJ3Vm5pd1JJQUJ6QUdJQWJCRWtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFlTHFGUlE2OWRJXzJRRUFBQUFBQUFEd1AtQUJBUFVCQUFBQUFQZ0JBSmdDQUtBQ0FMVUMFJQhMMEMFCPBMTUFDQU1nQ0FPQUNBT2dDQVBnQ05vQURCSkFEQUpnREFhZ0RwcVBBRHJvRENVNVpUVEk2TkRZeU11QURsUkNRQkFDWUJBSEJCQUFBQUEJAwh5UVEJCQEBGE5nRUFQRUUBCwkBQEQ0QkFBLpoCiQEhQXhMVzVBNjUBQC1KbHpJQVFvQURGN0ZLNUg0AfVMem9KVGxsTk1qbzBOakl5UUpVUVMRZAxQQV9VEQwMQUFBVx0MAFkdDABhHQwAYx0M9EgBZUFBLtgCAOACyqhNgAMAiAMBkAMAmAMUoAMBqgMAwAPgqAHIAwDSAyoIChIkYmFhN2FjZGMtYjdkZS00OGMyLTkxZjctZDAzNDNhNzRhZTY4GAHYAwDgAwDoAwL4AwCABACSBAkvb3BlbnJ0YjKYBACiBA8yMDcuMjM3LjE1MC4yNDaoBMqkBbIEDAgAEAAYACAAMAA4ALgEAMAEAMgEANIEDzEwMDk0I05ZTTI6NDYyMtoEAggB4AQA8ASR37BNggUZb3JnLnByZWJpZC5tb2JpbGUuZGVtb2FwcIgFAZgFAKAF____________AaoFJDNkYzc2NjY3LWE1MDAtNGUwMS1hNDNiLTM2OGUzNmQ2YzdjY8AFAMkFAAAAAAAA8D_SBQkJAAAAAAAAAADYBQHgBQHwBQH6BQQIABAAkAYBmAYAuAYAwQZpnzTwP8gGANAG1jPaBhYKEAkUGQFEEAAYAOAGDPIGAggAgAcBiAcA%26s%3D22a3ef24348db8bef73dbc632c545607e28669d3;ts=1565379629;cet=0;cecb=\"></script>"
}
For version 1.2, you would change the native request to the following:
"native": {
"request": "{\"ver\":\"1.2\",\"context\":2,\"contextsubtype\":20,\"plcmttype\":1,\"eventtrackers\":[{\"event\":1,\"methods\":[1]}],\"assets\":[{\"required\":1,\"title\":{\"len\":90}},{\"required\":1,\"img\":{\"type\":3,\"wmin\":200,\"hmin\":200}},{\"required\":1,\"data\":{\"type\":1,\"len\":25}}]}",
"ver": "1.2"
}
Cached response will be as following:
{
"ver": "1.2",
"assets": [
{
"id": 1,
"img": {
"url": "https://vcdn.adnxs.com/p/creative-image/7e/71/90/27/7e719027-80ef-4664-9b6d-a763da4cea4e.png",
"w": 300,
"h": 250,
"ext": {
"appnexus": {
"prevent_crop": 0
}
}
}
},
{
"id": 0,
"title": {
"text": "This is an RTB ad"
}
},
{
"id": 2,
"data": {
"value": "AppNexus"
}
}
],
"link": {
"url": "https://nym1-ib.adnxs.com/click?exSuR-F6hD97FK5H4XqEPwAAAAAAAAAAexSuR-F6hD97FK5H4XqEP47fglK67itfhvxebRKgw2-2y01dAAAAAHu99gBuJwAAbicAAAIAAACRL6wJ-MwcAAAAAABVU0QAVVNEAAEAAQDILwAAAAABAgMCAAAAAMYApiPLOwAAAAA./bcr=AAAAAAAA8D8=/pp=${AUCTION_PRICE}/cnd=%21BxLG5Qimo8AOEJHfsE0Y-JlzIAQoADF7FK5H4XqEPzoJTllNMjo0NDY0QJUQSQAAAAAAAPA_UQAAAAAAAAAAWQAAAAAAAAAAYQAAAAAAAAAAaQAAAAAAAAAAcQAAAAAAAAAAeAA./cca=MTAwOTQjTllNMjo0NDY0/bn=87154/clickenc=http%3A%2F%2Fappnexus.com"
},
"eventtrackers": [
{
"event": 1,
"method": 1,
"url": "https://nym1-ib.adnxs.com/it?an_audit=0&e=wqT_3QKpCOgpBAAAAwDWAAUBCLaXt-oFEI6_i5Sl1_uVXxiG-fvqpoLo4W8qNgl7FK5H4XqEPxF7FK5H4XqEPxkAAAkCACERGwApEQkAMQkZsAAAMPv62gc47k5A7k5IAlCR37BNWPiZc2AAaMjfjAF48qgFgAEBigEDVVNEkgUG8FWYAQGgAQGoAQGwAQC4AQLAAQPIAQLQAQLYARvgAQDwAQCKAjx1ZignYScsIDMzOTM1MjAsIDE1NjUzNzk1MTApO3VmKCdyJywgMTYyMjc5MzEzLCAxNRkf8LCSArECIXUwSEtsUWltbzhBT0VKSGZzRTBZQUNENG1YTXdBRGdBUUFSSTdrNVEtX3JhQjFnQVlPNEdhQUJ3Vm5pc1JJQUJ6QUdJQWF4RWtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFaaTFySDNCX2RRXzJRRUFBQUFBQUFEd1AtQUJBUFVCQUFBQUFQZ0JBSmdDQUtBQ0FMVUMFJQhMMEMFCPBMTUFDQU1nQ0FPQUNBT2dDQVBnQ05vQURCSkFEQUpnREFhZ0RwcVBBRHJvRENVNVpUVEk2TkRRMk5PQURsUkNRQkFDWUJBSEJCQUFBQUEJAwh5UVEJCQEBGE5nRUFQRUUBCwkBPEQ0QkFBLpoCiQEhQnhMRzU6NQFALUpseklBUW9BREY3Rks1SDQB9Ux6b0pUbGxOTWpvME5EWTBRSlVRUxFkDFBBX1URDAxBQUFXHQwAWR0MAGEdDABjHQz0SAFlQUEu2AIA4ALKqE2AAwCIAwGQAwCYAxSgAwGqAwDAA-CoAcgDANIDKggKEiRiYWE3YWNkYy1iN2RlLTQ4YzItOTFmNy1kMDM0M2E3NGFlNjgYAdgDAOADAOgDAvgDAIAEAJIECS9vcGVucnRiMpgEAKIEDzIwNy4yMzcuMTUwLjI0NqgEyKQFsgQMCAAQABgAIAAwADgAuAQAwAQAyAQA0gQPMTAwOTQjTllNMjo0NDY02gQCCAHgBADwBJHfsE2CBRlvcmcucHJlYmlkLm1vYmlsZS5kZW1vYXBwiAUBmAUAoAX___________8BqgUkM2RjNzY2NjctYTUwMC00ZTAxLWE0M2ItMzY4ZTM2ZDZjN2NjwAUAyQUAAAAAAADwP9IFCQkAAAAAAAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgC4BgDBBmmfNPA_yAYA0AbWM9oGFgoQCRQZAUQQABgA4AYM8gYCCACABwGIBwA.&s=4b7e0a8dd4d99349bb87c51b1a58f7a2c1122b93&pp=${AUCTION_PRICE}"
}
]
}
The main difference is imptrackers are changed into eventtrackers.
Prebid SDK today only supports calling the cache server. We would have to modify the PUC if we were add support of not calling cache server for native.
PUC doesn't need change if we don't use Prebid Cache. The publisher would get the assets just by using hb_
keys, like on the ones on this page: http://prebid.org/dev-docs/show-native-ads.html#2-add-native-ad-units
Xandr team is actively developing this, let's schedule a time to discuss the details.
See PR #140
Use DFP Native Styles and MoPub Custom Banner as the container of native assets.
Proposed APIs for Android is as following: To create a Native Ad Unit:
To configure a Native request:
For example, calling the APIs like the following:
Will result in a request to PBS like the following: