diff --git a/docs.json b/docs.json index abfd76d5..f8ddbac3 100644 --- a/docs.json +++ b/docs.json @@ -22,6 +22,9 @@ }, { "src": "/unify-tracking.js" + }, + { + "src": "/vercel-analytics.js" } ], "integrations": { diff --git a/vercel-analytics.js b/vercel-analytics.js new file mode 100644 index 00000000..8c39776b --- /dev/null +++ b/vercel-analytics.js @@ -0,0 +1,12 @@ +// Vercel Web Analytics +// These docs are served under checklyhq.com/docs via a Vercel rewrite, so the +// insights script and its beacon only resolve at the domain root. A path +// relative to /docs 404s. +(function () { + if (window.__vercelInsightsAdded) return; + window.__vercelInsightsAdded = true; + + var script = document.createElement('script'); + script.src = '/_vercel/insights/script.js'; + document.head.appendChild(script); +})();