Skip to content

Bring the service-layer features to main and load GA4 on every page - #60

Closed
jsshin2022 wants to merge 4 commits into
mainfrom
hub-entertain
Closed

jsshin2022 wants to merge 4 commits into
mainfrom
hub-entertain

Conversation

@jsshin2022

Copy link
Copy Markdown
Member

#58 was merged into the hub-intro-readme branch instead of main, so its changes never reached the site. This PR carries them over and installs GA4.

What changes

  • Carry-over of Add a start quiz, finish cards, Builder pages, and a correlation game #58: event layer, start quiz, finish cards, Builder pages and badges, the correlation game, and the review fixes (same three commits, rebased on main). The only conflict was the init block, where both openFromHash() and the quiz opener are kept.
  • GA4: assets/js/ga.js loads gtag once and configures G-C5V0X2SGD3. The tag already on main (G-BEBVKYH8HL, shared with the web book) stays configured too, until one property is picked. Local previews are skipped. All pages use it: index, article, 404, game, and the generated Builder pages.
  • Deep links #station= report open_repo with source: "deeplink".
  • Footer notes that visits are counted anonymously with Google Analytics.

Checked

After merge

Run "Deploy site" once (it builds the Builder pages). In GA4, mark quiz_complete, click_outbound, click_featured, share, game_complete, click_join as key events.


Generated by Claude Code

…game

- assets/js/track.js: hubTrack() sends events to GA4 when it is
  installed and does nothing otherwise; shared copy and share-url
  helpers. Hub clicks are tagged with the names in the event list.
- Start quiz: three questions pick one of the existing routes and its
  first repo; reachable from the goal row, #start, or ?quiz=1.
- Finish card: when every item in a level is marked done, the hub
  offers a 1200x630 card to save, drawn on a canvas.
- Builder pages: scripts/build_builders.py writes builders/<slug>.html,
  an index, and an SVG badge per Builder; the deploy workflow runs it.
  Share images come from scripts/builder_cards.py. The Builder dialog
  links to the page and shows a project retro when one is filled in.
- game.html: ten situations to sort into correlation or causation,
  each answer linking to a web book chapter.
- Quiz: the optional first stop no longer hides behind the skip-link
  class; the result says why the route was picked, and "이 순서로 보기"
  scrolls to the shelf, opens at the suggested card, and the route note
  starts there. Marketing work with hands-on experience goes to the
  experiment route; "used it at work" plus "code" starts at L2.
- Events: analytics attribute renamed to data-event so map lines stop
  sending their track id; re-rendering after "학습 완료" no longer sends
  open_repo; open_repo sources split (continue, spotlight, fresh,
  map_list, builder_dialog); click_join carries source; quiz_start and
  game_start carry retry; quiz key exp renamed to experience.
- Game: each situation states the claim being judged; five causal and
  five correlational items; wording states the assumptions; the result
  splits the score by kind so answering "상관" every time does not pass;
  sharing includes the score and uses the share sheet when available.
- Finish card: optional name, wording for a single item, next level
  button, share sheet on phones with download as fallback.
- Builder pages: badge reads "N기부터 · M개 기수"; a self-edit link
  when the intro or photo is missing; badge code wraps on phones.
- /#contrib scrolls to the section; privacy copy matches what is sent.
- assets/js/ga.js configures the hub property G-C5V0X2SGD3 and keeps
  the tag already on main (G-BEBVKYH8HL), and skips local previews.
- index, article, 404, game and the generated Builder pages include it;
  the inline snippets are removed.
- Deep links (#station=) report open_repo with source "deeplink".
- Footer says visits are counted anonymously with Google Analytics.

Copy link
Copy Markdown
Member Author

Superseded: these four commits reached main through #61 (merged), so this branch has nothing left to add. Closing.


Generated by Claude Code

@jsshin2022 jsshin2022 closed this Oct 24, 2026
@jsshin2022
jsshin2022 deleted the hub-entertain branch October 25, 2026 12:47
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.

1 participant