-
Notifications
You must be signed in to change notification settings - Fork 0
FreakOut Bid Adapter: add new bid adapter #1
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
base: master
Are you sure you want to change the base?
Conversation
Upstream への PR についてPR comment は .github/PULL_REQUEST_TEMPLATE.md から作成したものです。 タイトル含め、おおよそこのようになるかと思いますが、いくつか確認事項があります。
|
実装概要参考: How to Add a New Prebid.js Bidder Adapter for Header Bidding
|
動作確認ダミー広告サーバレスポンスにリクエストされた Bidding ID を埋め込む必要があるため、 Cloud Functions でレスポンスを返すようにしています。また、 CORS にひっかかるのでこちらの対応も必要です。 以下をダミーの広告サーバとして使用しています。 ローカル環境(Google Publisher Tag)での確認
diff --git a/integrationExamples/gpt/hello_world.html b/integrationExamples/gpt/hello_world.html
index 47ba5b8f..6ee5040f 100755
--- a/integrationExamples/gpt/hello_world.html
+++ b/integrationExamples/gpt/hello_world.html
@@ -24,9 +24,9 @@
},
// Replace this object to test a new Adapter!
bids: [{
- bidder: 'appnexus',
+ bidder: 'freakout',
params: {
- placementId: 13144370
+ adspot_id: 'NDgxOjUx',
}
}]
@@ -45,6 +45,9 @@
});
pbjs.que.push(function() {
+ pbjs.setConfig({freakout: {
+ endpoint_url: 'https://us-central1-sandbox-5e3e0.cloudfunctions.net/headerBidding'
+ }});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest,
@@ -88,4 +91,4 @@
</script>
</div>
</body>
-</html>
\ No newline at end of file
+</html> ローカルサーバを動かします。
ブラウザで以下のURLを開きます。
明滅する画像(ランダム)が表示されれば成功です。デベロッパーツールで詳細ログ等を確認できます。 Google Ad Managerでの確認Google Ad Manager に適切な設定を行い、上と同じような設定をすることで動作を確認できました。 実際の配置先: |
ユニットテストについて
が、外部環境に依存しているテストがあるのか、たまに失敗するものがあるようです。 |
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.
いくつかコメントと質問しました 🙇
return syncs; | ||
} | ||
|
||
serverResponses.forEach(res => { |
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.
[q]
sync_script_urls
の対応は不要なのでしょうか?
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.
script urlを挿入してのSyncはサポートされていないため行っていません。
} | ||
|
||
/** | ||
* @return {string} USD or JPY |
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.
[MEMO]
USD
or JPY
で返却される
params: { | ||
adspot_id: 'ABCD1234' | ||
}, | ||
adUnitCode: 'adunit-code', |
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.
[q]
adUnitCode
に対して特に何もしていませんが、問題ないのでしょうか?
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.
adUnitCode
は実際の引数には渡されてくるので記述していますが、リクエストを生成する上で特に必要ないため処理していません。
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.
LGTMです 👍
fout/rfp#7726 を踏まえての結合テスト テスト用サンプルを以下のように変更: diff --git a/integrationExamples/gpt/hello_world.html b/integrationExamples/gpt/hello_world.html
index 47ba5b8f..c74b9b60 100755
--- a/integrationExamples/gpt/hello_world.html
+++ b/integrationExamples/gpt/hello_world.html
@@ -24,9 +24,10 @@
},
// Replace this object to test a new Adapter!
bids: [{
- bidder: 'appnexus',
+ bidder: 'freakout',
params: {
- placementId: 13144370
+ adspot_id: 'NTE2OjE3MTA5',
+ ad_type: 14,
}
}]
@@ -88,4 +89,4 @@
</script>
</div>
</body>
-</html>
\ No newline at end of file
+</html> レスポンス: {
"items": [
{
"ad_id": "340",
"advertiser_id": "2",
"conv_type": "0",
"creative_html": "<script>function render(){const n=document.createElement('canvas');n.width=300;n.height=250;document.body||(document.body=document.createElement('body'));document.body.appendChild(n);const t=n.getContext('2d');let i=0;const r=new Image;r.onload=function(){i=t.globalAlpha;t.drawImage(r,0,0)};n.onclick=function(){window.open('{{click_url}}')};r.src='https://test-site.ad-platform.biz/freakout_300x250.png';setInterval(()=>{t.fillStyle='#FFFFFF',t.fillRect(0,0,n.width,n.height),i-=.1,i<0&&(i=1),t.globalAlpha=i,t.drawImage(r,0,0)},200)}render()</script>",
"dat": "Qj6QYrBDs_1JiRmakg4WZYLmR7nucnt4M7KEydGjbt3cle78osoL0Uy7ip1yLSgQ",
"session_id": "5369CCCA-FB43-11E3-8217-CBAB867B35CC",
"optout_click": "",
"creative_width": "300",
"creative_height": "250",
"ttl": "300",
"cpm": "30",
"cur": "JPY",
"pb_bid": "2f1e4c4f0846a"
}
],
"viewable_impression": 1,
"sync_iframe_urls": [
"https://sync.example.com/1.html",
"https://sync.example.com/2.html"
]
} 結果: 失敗 原因: Prebid.js の Bid Response に |
modules/freakoutBidAdapter.md
Outdated
bids: [{ | ||
bidder: 'freakout', | ||
params: { | ||
adspot_id: 'NDgxOjUx' |
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.
[IMO]
ad_type
も必須かと思いますので、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.
4929394 にてドキュメントとテスト用のファイルに追加しました。
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.
引き続きLGTMです 👍
fout/rfp#8064 リリース後の確認 確認の内容は前回 (#1 (comment)) と同じ レスポンス: {
"items": [
{
"ad_id": "340",
"advertiser_id": "2",
"conv_type": "0",
"creative_html": "<script>function render(){const n=document.createElement('canvas');n.width=300;n.height=250;document.body||(document.body=document.createElement('body'));document.body.appendChild(n);const t=n.getContext('2d');let i=0;const r=new Image;r.onload=function(){i=t.globalAlpha;t.drawImage(r,0,0)};n.onclick=function(){window.open('{{click_url}}')};r.src='https://test-site.ad-platform.biz/freakout_300x250.png';setInterval(()=>{t.fillStyle='#FFFFFF',t.fillRect(0,0,n.width,n.height),i-=.1,i<0&&(i=1),t.globalAlpha=i,t.drawImage(r,0,0)},200)}render()</script>",
"creative_id": "creative-1",
"dat": "Qj6QYrBDs_1JiRmakg4WZYLmR7nucnt4M7KEydGjbt3cle78osoL0Uy7ip1yLSgQ",
"session_id": "5369CCCA-FB43-11E3-8217-CBAB867B35CC",
"optout_click": "",
"creative_width": "300",
"creative_height": "250",
"ttl": "300",
"cpm": "30",
"cur": "JPY",
"pb_bid": "26ff9cf4dc89f9"
}
],
"viewable_impression": 1,
"sync_iframe_urls": [
"https://sync.example.com/1.html",
"https://sync.example.com/2.html"
]
} 表示内容: 正しく表示された。 |
fout/rfp_go#1887 にて対応。
fout/prebid.github.io#1 にて対応。 |
…erter (prebid#10177) * ET-1691: Pulsepoint Analytics adapter for Prebid. (#1) * ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter * ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter * ET-1691: cleanup * ET-1691: minor * ET-1691: revert package.json change * Adding bidRequest to bidFactory.createBid method as per prebid#509 * ET-1765: Adding support for additional params in PulsePoint adapter (prebid#2) * ET-1850: Fixing prebid#866 * Minor fix * Adding mandatory parameters to Bid * Switching to ortbConverter * updating docs --------- Co-authored-by: Eugene Rachitskiy <[email protected]>
* PE-87: Implement Prebid Adapter (#1) * PE-87: implement BT Bid Adapter * PE-87: rework adapter to use ortbConverter lib, make requested changes * PE-87: update imports * PE-110: Add user sync logic to the Prebid Adapter (prebid#3) * PE-110: add user sync logic * PE-110: update userSync url * PE-110: check if iframe is enabled before setting params * PE-111: BT Prebid Adapter can request AA ads or regular ads (prebid#2) * PE-120: Send Prebid Bidder info to BT Server (prebid#4) * PE-120: add btBidderCode to the bid object * PE-120: use single quotes for logs string * PE-123: Add More Metadata in site.ext.blockthrough (prebid#5) * PE-123: send additional meta data * PE-123: send auctionID under imp.ext.prebid.blockthrough * PE-123: use ortb2 config to set site.ext params * PE-123: sent auctionId in ext.prebid.blockthrough.auctionID * PE-123: update logs for bidderConfig setup * PE-000: check if blockthrough is defined (prebid#6) * PE-87: remove BT specific logic (prebid#7) * Implement Blockthrough Prebid Adapter * PE-87: Implement Prebid Adapter - misc fixes (prebid#9) * PE-87: rename test file, add bidder config * PE-87: increase ttl * PE-000: fix test * BP-74: Change the way we enable debug (prebid#10) * BP-79: Send GPID as a part of `imp[].ext` (prebid#11) * BP-79: send gpid in imp.ext * BP-79: add optional operator * BP-90: Update Cookie Sync Logic (prebid#12) * BP-90: pass bidder to cookie sync * BP-90: update sync logic, fix typo * BP-90: use const for syncs variable * BP-55: Re-add endpoint URLs (prebid#13) * BP-91: Add prebid JS version to auction request (prebid#14)
|
動作確認ディスプレイ広告のみ確認を行った(インフィード広告は非対応) #1 (comment) と同様の確認を行った。 ローカルでの確認問題なし。 GAM 経由での確認URL は前回から変更、 prebid.js のみ新たにビルドしたものに差し替えた。 問題なし。 |
引き続きLGTMです |
Type of change
Description of change
Adding FreakOut bid adapter
Be sure to test the integration with your adserver using the Hello World sample page.
For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide: