Skip to content

Connect the web book to the hub and add reading progress - #91

Merged
jsshin2022 merged 5 commits into
mainfrom
site/hub-link
Oct 25, 2026
Merged

jsshin2022 merged 5 commits into
mainfrom
site/hub-link

Conversation

@jsshin2022

@jsshin2022 jsshin2022 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Status

Review Required

Description

웹북에서 Causal Inference Hub가 잘 보이고 서로 넘어가기 쉽게 연결했습니다. 읽는 사람이 진도를 보고 반응을 남길 수 있게 읽기 화면도 다듬었습니다. 허브 쪽 연동(#station= 링크, 허브 GA G-C5V0X2SGD3·교차 추적, 웹북 진도·여권 스탬프)은 모두 허브 main에 들어가 있습니다. 허브 연재 '번역 노트: Brave & True 한국어판'은 CausalInferenceLab/CausalInferenceLab.github.io#68입니다.

허브로 가는 길 (모든 페이지)

  • 왼쪽 목차 맨 위: 작은 알약 버튼 → Causal Inference Hub 카드(← 아이콘, '인과추론팀 커리큘럼과 오픈소스')
  • 휴대폰 상단 막대: 검색 옆에 허브 버튼(늘 보임). 긴 장 제목은 말줄임으로 줄여 버튼이 밀려나지 않게 함
  • 페이지 아래: 인과추론 허브
  • 장 끝: 'Causal Inference Hub에서 이어 보기' 카드. 장마다 다음에 볼 자료(2장 → 온라인 통제 실험, 17–23장·부록 A–D → CausalML 스터디, 그 밖 → 산업 사례 템플릿)를 허브에서 바로 열어 줌
  • 첫 화면: 위치 표시 인과추론 허브 › 커리큘럼 L1, 인과추론 허브 버튼, 들어가며의 허브 배너와 '인과추론 허브에서 이어 가기' 절
  • 팀 사이트(같은 도메인) 링크는 새 창이 아니라 같은 탭에서 열림(link-external-filter)

읽기 화면

  • 장 제목 아래: 약 N분 · 30편 중 N번째 · 노트북 보기 (+ 읽은 장이면 ✓ 읽은 장)
  • 화면 맨 위 얇은 읽기 진행 막대
  • 읽은 장 기록: 장 끝까지 내려와 30초 이상 머물면 읽은 장으로 기록 → 왼쪽 목차에 ✓, 장 끝에 '30편 중 N편 읽음' 막대
  • 첫 화면: 읽던 장이 있으면 첫 버튼이 이어 읽기 · 5장 선형회귀의 터무니없는 효과로 바뀌고, 아래에 진도와 1장부터 읽기
  • 장 끝 평가: '이 장, 도움이 됐나요?' 도움이 됐어요 / 어려웠어요. '어려웠어요'를 누르면 의견 나누기로 안내
  • 기록은 이 브라우저(localStorage)에만 남고 서버로 보내지 않습니다
  • 첫 화면 버튼은 3개로 줄임: 원서 보기는 부제의 원서 제목 링크로 옮김

GA4 (웹북 G-BEBVKYH8HL)

  • Quarto 기본 GA 설정 대신 book/analytics.html로 직접 넣음: 허브에서 온 utm_*를 page_location으로 기록한 뒤 주소창에서 지움
  • 허브로 가는 링크에 utm_source=webbook&utm_content=<누른 곳>을 붙이고 hub_click(placement: sidebar, topbar, footer, hero, intro_banner, chapter_end, content) 전송
  • chapter_complete(장, 몇 번째, 읽은 장 수), chapter_feedback(helpful / hard), continue_reading, search(검색어, 결과 수)
  • 머지 후: GA 관리 화면에서 placement, chapter, value를 이벤트 범위 맞춤 측정기준으로 등록해 주세요

허브와 기록 공유

  • 웹북과 허브는 같은 도메인이라 브라우저 저장소를 함께 씁니다. 다른 팀 사이트와 섞이지 않게 웹북 기록은 cil-book-read(읽은 장), cil-book-last(마지막 장, 장 이름, 전체 편수), cil-book-vote(평가)에 둡니다
  • 허브는 이 기록으로 역 정보 창에 '내 진도'와 '이어 읽기'를, 활동 여권에 '웹북 독자' 스탬프를 보여 줍니다(허브 propensity score chapter 오류 #67)
  • 처음으로 한 장을 끝까지 읽으면 장 끝에 '허브 활동 여권에 웹북 독자 스탬프가 찍혔어요 · 여권 보기'(/#passport) 안내
  • 다른 탭에서 읽은 기록을 덮어쓰지 않도록 저장 직전에 다시 읽음
  • GA4는 배포 주소(causalinferencelab.github.io)에서만 켜고, 허브와 같이 Google 신호·광고 개인화는 끔. 로컬·PR 미리보기는 집계하지 않음

허브 연재와 연결

  • 들어가며 '이렇게 읽어 주세요'에 연재 1편 링크, 용어집의 '용어 제안하기' 상자에 2편(번역하며 정한 인과추론 용어) 링크
  • 연재 글은 허브 #68에서 10/26, 11/2, 11/9에 한 편씩 열리고, 직접 주소로는 머지 직후부터 열립니다

머지 순서

허브 #68 → 이 PR. 순서가 바뀌어도 깨지는 곳은 없지만, #68 전에는 연재 링크가 '글을 찾을 수 없습니다'로 열립니다.

확인한 것

  • 데스크톱·노트북 폭·휴대폰·다크 모드 화면
  • 읽은 장 기록, 평가, 이어 읽기, 허브 링크의 utm과 같은 탭 이동, GA 이벤트(dataLayer)를 브라우저에서 직접 확인
  • 전 페이지 내부 링크 깨짐 0건, 휴대폰 가로 넘침 0건, 빌드 오류 없음

https://claude.ai/code/session_01WELSFHaGT1Gh5sSRyUvAMx


Generated by Claude Code

Add a back link at the top of the sidebar, a hub entry in the footer,
a hub > shelf breadcrumb on the landing page, and a short section on
where the book sits on the hub's line map. The README gets the same
link.
The hub moved from a line map to an L0-L4 curriculum, so the landing
breadcrumb and intro section now use its terms and open the book's own
entry with a #station= link. Each chapter ends with one hub resource
to read next, picked by chapter: the online experiment materials after
chapter 2, the CausalML study after the ML chapters, and the industry
case templates elsewhere.
- Track finished chapters in the browser: a check mark in the sidebar,
  a progress line at the end of each chapter, and a continue-reading
  button on the landing page.
- Show reading time, position in the book and a notebook link under
  each chapter title, plus a thin reading progress bar.
- Ask whether the chapter helped and send the answer as a GA4 event.
- Replace the sidebar pill with a hub card, add a hub button to the
  mobile top bar and a hub banner on the landing page.
- Load GA4 from our own snippet so incoming utm_* are recorded and then
  removed from the address bar; links to team sites on this domain open
  in the same tab and send hub_click with where they were clicked.
- Send search terms from the search dialog as GA4 search events.
@jsshin2022 jsshin2022 changed the title Link the web book to the Causal Inference Hub Connect the web book to the hub and add reading progress Oct 24, 2026
- Store reading data under cil-book-* so it does not clash with other
  team sites on the domain, and keep the last chapter's label and the
  chapter count for the hub to show.
- Re-read stored progress and votes before writing so a second tab does
  not overwrite them.
- After the first finished chapter, point to the web book reader stamp
  in the hub passport.
- Load GA4 only on causalinferencelab.github.io and turn off Google
  signals and ad personalisation, matching the hub.
- Treat the hub's own pages (game, lab, Builders, posts) as the hub when
  tracking clicks.
@jsshin2022
jsshin2022 merged commit 732bdfc into main Oct 25, 2026
2 checks passed
@jsshin2022
jsshin2022 deleted the site/hub-link branch October 25, 2026 11:34
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.

3 participants