Commit c7b1f33
committed
feat: add Vercel Web Analytics to docs site
The docs are served from checklyhq.com/docs via a Vercel rewrite to
Mintlify, so the marketing site's <Analytics /> component never runs on
these pages — Vercel proxies Mintlify's HTML and our React tree is never
involved.
Since docs share an origin with the marketing site, the insights script
already served at /_vercel/insights/script.js loads and beacons back to
/_vercel/insights/view with correct attribution. Mintlify has no Vercel
analytics integration, so this goes in via a custom script.
The absolute path matters: /docs/_vercel/insights/script.js 404s, only
the root path resolves.
Verified against production: initial pageview fires, and client-side
sidebar navigation registers as a distinct path rather than collapsing
into the entry page (the script patches history.pushState and listens
for popstate).1 parent 9741c73 commit c7b1f33
2 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments