Skip to content

feat(disney): add featured offer slot with outbound tracking#972

Open
falgon wants to merge 2 commits intodevelopfrom
feature/disney-offer-foundation
Open

feat(disney): add featured offer slot with outbound tracking#972
falgon wants to merge 2 commits intodevelopfrom
feature/disney-offer-foundation

Conversation

@falgon
Copy link
Owner

@falgon falgon commented Feb 23, 2026

概要

  • disney_experience_summary に送客導線の基盤を追加
  • 記事ごとの表示ではなく、一覧タブ上部に 1 枠の集約PRスロットを実装
  • 送客リンクは disney_experience_summary/go/:offerId/ 経由で遷移し、UTMを付与
  • offer_click を GA4 (gtag) イベントとして送信

主な変更

  • contents/config/disney/Offers.dhall を追加(オファー定義)
  • src/Rules/DisneyExperienceSummary.hs
    • Offers.dhall の読み込み
    • featured offer HTML の生成
    • 送客リダイレクトページ生成(go/:offerId/index.html
    • UTM パラメータ付与
  • contents/pages/disney_experience_summary/jp.html
    • 一覧上部に featured-offer-slot を追加
  • contents/scss/disney_experience_summary_only.scss
    • featured offer 用スタイルを追加(モバイル対応含む)
  • contents/ts/disney-tag-filter.ts
    • .offer-link クリック時に offer_click を計測
  • contents/ts/__tests__/disney-tag-filter.test.ts
    • offer click tracking テストを追加

動作確認

  • npm run test
  • npm run check:ts(既存 warning のみ)
  • stack build
  • stack exec site -- build
  • 生成結果確認: docs/disney_experience_summary/jp.html に featured offer が描画されることを確認

備考

  • 表示確認用にサンプルオファーを 1 件追加しています

Refs: #954, #957, #958, #959, #960, #961

@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 36.23% 475 / 1311
🔵 Statements 36.17% 492 / 1360
🔵 Functions 37.5% 99 / 264
🔵 Branches 29.4% 172 / 585
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
contents/ts/disney-tag-filter.ts 29.49% 26.1% 25.19% 29.59% 23-537, 572, 589-590, 597, 599, 600, 606-614, 638-644, 661, 674, 685-692, 696-701, 707, 723, 731, 743, 753, 756-772, 804, 816, 832-842, 846, 859, 871-872, 885-887, 903-905, 914, 917, 920-922, 943, 947, 952-953, 958-960, 965-967, 973-979, 984-990, 1000, 1006, 1030-1040, 1050-1060, 1072-1090, 1102-1104, 1115-1128, 1163-1329
Generated in workflow #518 for commit 8aa2dad by the Vitest Coverage Report Action

@github-actions
Copy link
Contributor

Haskell Test Coverage Report

Generating combined coverage report.
Summary combined coverage report:
 78% expressions used (1005/1287)
 55% boolean coverage (5/9)
      50% guards (3/6), 3 always True
      66% 'if' conditions (2/3), 1 always True
     100% qualifiers (0/0)
 77% alternatives used (34/44)
 67% local declarations used (38/56)
 50% top-level declarations used (126/251)
The combined coverage report is available at
/Users/runner/work/roki-web/roki-web/.stack-work/install/aarch64-osx/c8bd8cc889b4268cdf5e7d0b073c5450e5447f77efaf84c8174147ae1a288879/9.6.6/hpc/combined/custom/hpc_index.html.

Generated by stack hpc report

@kiirotori
Copy link
Collaborator


more info

  • ☁️ Storage Free space 2.01 GiB 13.43%
  • 📂 0 B CI_WORK/GitHubActions/roki-web

@falgon
Copy link
Owner Author

falgon commented Feb 23, 2026

運用メモとして、実案件反映時に必要な作業を追記する

対応方法

  1. contents/config/disney/Offers.dhall を案件ごとに更新

    • offerId を一意にする
    • offerUrl を実際の遷移先URLにする
    • offerTitle / offerCtaLabel / offerDescription を案件内容に合わせる
    • 掲載対象は offerIsActive = True にする
    • 必要に応じて offerUtmCampaign を設定(未設定時は offer_<offerId>
  2. contents/config/disney/OfferDeliveryPolicies.dhall を更新

    • policyOfferIdOffers.dhallofferId と一致させる
    • 同一提携先のオファーは policyPartnerId を同じ値にする(公平性計算の単位)
    • policyTargetShare / policyMinShare / policyMaxShare を提携条件に合わせて設定
    • 初期値として policyHistoricalImpressions / policyHistoricalClicks を必要なら投入
  3. 計測前提の確認

    • gtag が有効な環境で offer_click が送信されることを確認
    • 送信パラメータ: offer_id, offer_title, offer_partner_id, offer_placement, page_path, outbound_url
  4. 反映

    • 設定変更後に通常どおりビルド/デプロイ

必要であれば、次PRで OfferDeliveryPolicies.dhall のテンプレを複数提携先向けに拡張します。

@kiirotori
Copy link
Collaborator


more info

  • ☁️ Storage Free space 1.52 GiB 10.13%
  • 📂 0 B CI_WORK/GitHubActions/roki-web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants