Add Microsoft Clarity to Hugo with Cloudflare Zaraz - Without Redeploying A developer explains how to add Microsoft Clarity to a Hugo site using Cloudflare Zaraz, eliminating the need to rebuild and redeploy the site for analytics changes. The setup moves the Clarity script from the Hugo repository to Cloudflare's control layer, enabling toggling without a new build. Key caveats include proper consent configuration, content security policy adjustments, and masking settings for sensitive pages. Adding Microsoft Clarity to a Hugo site normally means placing its tracking script in a base template, rebuilding the site, and deploying the change. That works, but it couples analytics configuration to your release process. For a static site hosted on Cloudflare Pages, Cloudflare Zaraz provides another option: manage the Clarity script through Cloudflare instead of storing it in the Hugo repository. Once configured, Clarity can be enabled or disabled without another Hugo build or Cloudflare Pages deployment. There are two important caveats: Here is the complete setup. Instead of embedding Clarity in Hugo: Hugo template | +-- Microsoft Clarity script The script is managed through Cloudflare instead: Visitor | v Cloudflare Zaraz | +-- Loads Microsoft Clarity | v Hugo site on Cloudflare Pages The Hugo site remains responsible for the site itself. Zaraz becomes the control layer for the analytics script. You need: Cloudflare requires a custom domain before Zaraz can be enabled for a Pages project. Open your project in Microsoft Clarity and go to: Settings → Setup Choose the manual installation method and copy the complete tracking code. Each Clarity website project has its own tracking code. Microsoft normally instructs you to paste this code into the website's