Dev Tools · 1h ago
Decouple Analytics from Deploys: Add Clarity to Hugo via Zaraz
This guide shows how to add Microsoft Clarity to a Hugo site using Cloudflare Zaraz, avoiding the need to rebuild and redeploy the site for analytics changes. The Clarity script is managed through Cloudflare's Custom HTML tool, not stored in the Hugo repository. Two caveats: Clarity may not appear in Zaraz's native catalog, and a restrictive Content Security Policy may still require manual adjustments.
Meridian48 take
A practical workaround for static-site developers who want to decouple analytics configuration from their build pipeline, though it adds a dependency on Cloudflare's Zaraz platform.
Read the full reporting
Add Microsoft Clarity to Hugo with Cloudflare Zaraz - Without Redeploying →
DEV Community
hugocloudflare-zaraz