Cookie-Free Analytics for Hugo
Hugo builds blazing-fast static sites. GhostlyX fits naturally into a Hugo workflow: add the script to your head partial and every page in your site is covered.
Installation guide
Open your head partial
Open layouts/partials/head.html (or the equivalent partial in your theme). If you are using a theme, copy the head partial to your local layouts folder to override it.
Add the GhostlyX script before </head>
Paste the tracking script just before the closing </head> tag in your head partial.
<script defer src="https://cdn.ghostlyx.com/gx.js" data-site-id="YOUR_SITE_ID"></script>
Rebuild and deploy
Run hugo to rebuild your site. Deploy to your hosting provider. GhostlyX will start tracking immediately.
Why Hugo users choose GhostlyX
Hugo powers documentation sites, personal blogs, and corporate sites that are deployed to CDNs like Cloudflare Pages or GitHub Pages. These environments often have no server-side session handling, making server-side analytics integrations difficult. GhostlyX's client-side script is the simplest and most reliable option for static Hugo deployments.
Cookie-free tracking
No consent banner required under GDPR or PECR
Under 1.5 kB script
Negligible impact on page speed and Core Web Vitals
Real-time dashboard
See visitors as they arrive, updated every few seconds
Free plan available
Start tracking without a credit card
Replacing Google Analytics on Hugo?
See how GhostlyX compares feature by feature, including script size, GDPR compliance, and pricing.
Related integrations
Ready to add GhostlyX to Hugo?
Free plan available. Setup takes 3 minutes. No cookie consent banner required.
Get started free