Skip to content

IntimateMerger Analytics Adapter : fix cache#24

Open
eknis wants to merge 3 commits into
masterfrom
fix-im-analytics-adapter-module
Open

IntimateMerger Analytics Adapter : fix cache#24
eknis wants to merge 3 commits into
masterfrom
fix-im-analytics-adapter-module

Conversation

@eknis

@eknis eknis commented May 14, 2026

Copy link
Copy Markdown
Member

修正前挙動

1回目の BID_WON (wonSent=true 後)
  → L206: cacheWonBid → wonBids に追加
  → L210: sendWonBidsData 呼び出し
  → L267: delete cache.auctions[auctionId]  ← キャッシュ削除

2回目以降の BID_WON
  → L202: cache.auctions[auctionId] === undefined
  → L204: !auction → return  ← ここで落とされる
wonSent=true 後は 1件目のみ送信され、2件目以降はドロップされる。

修正後

AUCTION_INIT ──→ /pv エンドポイントへ即時送信
     ↓
 BID_WON × N ──→ cache に蓄積(待機)
     ↓
AUCTION_END ──→ 1500ms タイマー起動
     ↓(タイマー発火)
             ──→ /won エンドポイントへまとめて送信
                 以降の BID_WON は即時送信

@eknis eknis requested a review from fecker May 14, 2026 07:35
@eknis eknis marked this pull request as ready for review May 14, 2026 07:35

@fecker fecker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Auction Cache を消す処理は
https://github.com/prebid/Prebid.js/blob/471cb8dfd1cebf634b2bd443ba6359bd0ccd0735/modules/roxotAnalyticsAdapter.js#L189

が参考になるかなと思いました。
(まぁ、wonBids を送るたびに消してるので、それほど大きくはならないので大丈夫だと思いますが)

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.

2 participants