Skip to content

Polish: drop hero pill, simplify Paper label, soften cite copy + re-apply GA4#13

Merged
radinhamidi merged 2 commits intomainfrom
chore/copy-polish
Apr 30, 2026
Merged

Polish: drop hero pill, simplify Paper label, soften cite copy + re-apply GA4#13
radinhamidi merged 2 commits intomainfrom
chore/copy-polish

Conversation

@radinhamidi
Copy link
Copy Markdown
Member

Summary

Three copy edits + a recovery of the GA4 component that was orphaned during the PR #11/#12 merge sequence.

Copy edits

Where Before After
Homepage hero `Open source · WWW 2026 · SIGIR 2026 Reproducibility` pill (removed entirely; h1 now sits at top of block)
Footer → Project `Paper (WWW 2026)` `Paper`
/cite intro "…if you're comparing against the SIGIR 2026 leaderboard numbers." "…if you're referring to the SIGIR 2026 leaderboard numbers."

GA4 re-apply

PR #12 merged into `chore/site-seo` (its base) rather than `main`. When PR #11 merged into main, only the SEO commit landed — the GA component was orphaned. Cherry-picked `cf46b56` so GA4 is back. Cloudflare Web Analytics is enabled separately in the CF dashboard (no code), so both run side-by-side.

Operator follow-up (CF dashboard)

For each CF Pages project (`querygym-site`, `querygym-leaderboard`):

  1. Web Analytics → Enable.
  2. Settings → Environment variables → Production: `PUBLIC_GA_MEASUREMENT_ID = G-XXXXXXXXXX` (different value per site).
  3. Trigger a redeploy.

Test plan

  • `pnpm -F @qg/site build` → 6 pages.
  • Homepage: pill no longer in markup.
  • Footer: link reads `Paper`.
  • /cite copy: `referring to`.
  • GA4 component present in both layouts (renders only when env var set).
  • After CF redeploy: GA4 Realtime + CF Web Analytics dashboards both show traffic.

🤖 Generated with Claude Code

radinhamidi and others added 2 commits April 29, 2026 21:49
New shared component @qg/shared/components/GoogleAnalytics.astro
reads `PUBLIC_GA_MEASUREMENT_ID` at build time. Astro inlines
PUBLIC_* env vars into the static output, so each Cloudflare Pages
project sets its own ID via "Environment variables":

  querygym-site         → PUBLIC_GA_MEASUREMENT_ID = G-XXXXXXXXXX
  querygym-leaderboard  → PUBLIC_GA_MEASUREMENT_ID = G-YYYYYYYYYY

Component renders nothing if the env var is unset — keeps `pnpm dev`,
preview branches, and forks silent (no analytics traffic from dev or
contributor environments).

Wired into both layouts:
- web/site/src/layouts/Default.astro
- reproducibility/site/src/layouts/Default.astro

The inline config script is built as a string and emitted via
set:html so Astro doesn't try to parse JS function-body curly braces
as JSX expressions.

No consent banner. GA4's default IP anonymization applies; add a
banner if EU traffic becomes a real concern.

Verified locally: with env var set, gtag.js + config render in <head>
on both sites; without it, zero googletagmanager references in the
output.

Stacked on top of #11 (chore/site-seo). Once #11 merges, this PR's
diff will narrow to just the GA bits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three small copy edits informed by user review:
- Drop the "Open source · WWW 2026 · SIGIR 2026 Reproducibility"
  pill from the homepage hero. Hero h1 now sits at the top of the
  block (removed mt-5).
- Footer Project link "Paper (WWW 2026)" → "Paper". The venue is
  visible on the destination page; the parenthetical was clutter
  next to the other one-word labels.
- Cite intro: "comparing against the SIGIR 2026 leaderboard
  numbers" → "referring to the SIGIR 2026 leaderboard numbers".
  Softer and broader; not all referrers are doing comparisons.

Also re-applies the GA4 component (cherry-picked from cf46b56),
which was orphaned when PR #12 merged into the now-deleted
chore/site-seo branch instead of main. Sets us up for both GA4 and
Cloudflare Web Analytics running side-by-side once you flip the CF
toggle in the dashboard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
radinhamidi added a commit that referenced this pull request Apr 30, 2026
Three pieces of user-requested polish:

1. Marketing nav: add Leaderboard alongside Dashboard, both with the
   linkout arrow icon and opening in the current tab. Drop the
   trailing "↗" from the old "Dashboard ↗" label since the icon now
   conveys it.

2. Leaderboard nav: keep the Toolkit link (re-added earlier), with
   the same linkout icon, current-tab.

3. Header component: add a `newTab` prop separate from `external`.
   `external` controls icon rendering only; `newTab` controls
   target/rel. Default behavior is current-tab — let users
   middle-click / cmd-click for a new tab when they want one.

Also propagate same-tab to EcosystemMap cards (they were forcing
_blank for any http link).

Sitemap visibility: `sitemap-index.xml` is one level above the URLs
(it just points at sitemap-0.xml — standard Sitemaps protocol). When
visited directly it looks empty. Updated <link rel="sitemap"> to
point at /sitemap-0.xml so anything inspecting the page lands on the
populated file. robots.txt now lists both URLs (crawlers handle
either form).

Stacked on chore/copy-polish (PR #13). Once that merges, this PR's
diff narrows to just these files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@radinhamidi radinhamidi merged commit c8bf07c into main Apr 30, 2026
3 checks passed
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