Skip to content

Test/feature/adg cookie sync#6

Open
ghost wants to merge 3 commits into
masterfrom
test/feature/adg-cookie-sync
Open

Test/feature/adg cookie sync#6
ghost wants to merge 3 commits into
masterfrom
test/feature/adg-cookie-sync

Conversation

@ghost
Copy link
Copy Markdown

@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

Development

Successfully merging this pull request may close these issues.

0 participants