Skip to content
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

Test/feature/adg cookie sync #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ghost
Copy link

@ghost ghost commented Oct 7, 2020

メモ

Prebid Server側でCookieの情報をチェックし、なかった場合のみ、今回テスト用に定義したDummyEndpont先に対してUIDを取得するリクエストを送信する。
(Auctionと同時進行でCookieSyncを行うので、初回のAuctionにはUIDは付与されない)

その際に発行されたUIDをRedirectURLクエリのURLのクエリに追加してリダイレクトさせる。
リダイレクトされた /setuid からPrebid Server側のCookieに保存される。

次回以降の広告リクエスト MakeRequest から引数のrequestに対して request.User.BuyerUID に上記で発行されたUIDが付与できるようになる。

HTTPSでのみCookieSyncが機能するので、 HeaderBidding_Test ディレクトリのDocker-Composeを起動する
その際のHTTPサーバのポートは3000

DummyCookieSync Endpoint先の処理(Redirectさせる)

exports.handler = (event, context, callback) => {

    var location = decodeURI(event["params"]["redirectUri"])
    
    var regex = /\$UID/gi
    var replacedLocation = location.replace(regex, '12345678')

    context.succeed({"Location": replacedLocation});
};

Ad Generation added 3 commits September 28, 2020 13:38
HB_TESTのDocker-Composeに合わせてHTTPS接続のためにportを9000に変更
uidが付与される request.User.BuyerUIDのログを出力するようにする
@ghost ghost force-pushed the test/feature/adg-cookie-sync branch from e094ae5 to b856a05 Compare October 7, 2020 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
0 participants