Skip to content

feat: custom analytics events across the app + marketing site - #10

Merged
atom-tech9 merged 1 commit into
mainfrom
dev
Jul 7, 2026
Merged

atom-tech9 merged 1 commit into
mainfrom
dev

Conversation

@atom-tech9

Copy link
Copy Markdown
Owner

Wires Vercel Web Analytics custom events on both surfaces, with an identical window.va('event', {name, data}) payload shape:

App (src/lib/analytics.ts → trackEvent, over @vercel/analytics track):

  • Export PDF {skin, paper} — the core success action
  • Document Exported {format} — word/html/markdown
  • Template Used {template, source} — picker + deep link
  • Skin Applied {skin, source} — deep link
  • Import {source} — docx/html/github
  • AI Action {action} — no document content
  • Onboarding Completed — completing transition only

Marketing (prerendered, JS-stripped → data-track attrs fired by the inline ENHANCE_SCRIPT, no React):

  • Open App {location} — header/hero/cta-band/footer/
    template-page/skin-page/cheatsheet…
    (conversion attribution)
  • GitHub {location} · Sample Download {sample} · Language Switch {to}

Properties are flat and PII-free. Verified end-to-end against the built output: both paths emit the exact package payload shape.

Summary

Type of Change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — code change that neither fixes a bug nor adds a feature
  • chore — tooling / maintenance
  • test — adding or updating tests
  • perf — performance improvement
  • ci — CI / build changes

Screenshots

Checklist

  • npm run typecheck passes
  • npm run lint passes
  • npm run build passes
  • Follows the project code style (no any, immutable updates, logical CSS)
  • i18n keys added for any new user-facing strings (en and ar)
  • RTL layout verified for UI changes
  • No console.log (uses @/lib/logger)
  • Documentation updated if needed

Wires Vercel Web Analytics custom events on both surfaces, with an
identical window.va('event', {name, data}) payload shape:

App (src/lib/analytics.ts → trackEvent, over @vercel/analytics track):
- Export PDF {skin, paper}          — the core success action
- Document Exported {format}         — word/html/markdown
- Template Used {template, source}   — picker + deep link
- Skin Applied {skin, source}        — deep link
- Import {source}                    — docx/html/github
- AI Action {action}                 — no document content
- Onboarding Completed               — completing transition only

Marketing (prerendered, JS-stripped → data-track attrs fired by the
inline ENHANCE_SCRIPT, no React):
- Open App {location}                — header/hero/cta-band/footer/
                                       template-page/skin-page/cheatsheet…
                                       (conversion attribution)
- GitHub {location} · Sample Download {sample} · Language Switch {to}

Properties are flat and PII-free. Verified end-to-end against the built
output: both paths emit the exact package payload shape.
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scripto Building Building Preview, Comment Jul 7, 2026 8:50am

Request Review

@atom-tech9
atom-tech9 merged commit 4947636 into main Jul 7, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 48c09919 Deployed Jul 7, 2026 by vercel[bot]
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