Tag
#analytics
4 posts across the garden · browse essays
EssaysApr 4, 2026Evergreen
Adding Vercel Web Analytics to the landing pages (two lines, zero dependencies)
A two-line script tag on four landing pages gets me Web Vitals (LCP, CLS, INP, TTFB) on the Vercel dashboard, complementing PostHog on the behavior side.
EssaysJun 26, 2023Evergreen
Allowing Google Tag Manager through the Content-Security-Policy
The inevitable follow-up to adding GTM: the browser's CSP was blocking the script, so this PR adds googletagmanager.com to script-src and img-src in next.config.js.
EssaysJun 25, 2023Evergreen
Adding Google Analytics to a Next.js blog the old-fashioned way
First instrumentation on the blog: a gtag wrapper in lib/ga.js, a custom pages/_document.js with the Global Site Tag, and no npm dependency.
EssaysJun 25, 2023Evergreen
Migrating to GA4, swapping in Google Tag Manager, and renaming the site to steven.ocampo.io
Universal Analytics is on the way out, so this PR migrates to GA4 via Google Tag Manager loaded through next/script, and renames everything from stevieismagic.com to steven.ocampo.io.