Once your ZeroPress site is live on Cloudflare, you’ll naturally want to know who is visiting, which articles are the most popular, and where your traffic is coming from.
In the WordPress ecosystem, you might install a heavy plugin to track this. In a static site architecture, adding analytics is as simple as dropping a single JavaScript snippet into your head.html file.
The real question isn’t how to add analytics, but which analytics tool to choose. Let’s compare the two leading options for static sites.
Google Analytics 4 (The Industry Standard)
Google Analytics 4 (GA4) is the default choice for millions of websites. It is incredibly powerful, totally free, and integrates seamlessly with Google Ads and Google Search Console.
Pros of GA4 for ZeroPress:
- Deep, granular tracking of user journeys, conversions, and demographic data.
- Built-in integration with Google ecosystem.
- Free for almost all use cases.
Cons of GA4:
- Privacy Concerns: GA4 uses cookies and tracks users across the web. If you use it, you must have a Cookie Consent banner (GDPR compliance) that blocks the script until the user clicks “Accept”.
- Script Weight: The
gtag.jsscript is relatively heavy (around ~45KB). If you care about every millisecond of page load time, this can slightly impact your scores. - Overwhelming Interface: The GA4 dashboard is notoriously complex. If you just want to know how many page views you got yesterday, GA4 feels like flying a commercial jet to go to the grocery store.
How to Install in Jekyll:
Paste your GA4 tracking tag into the _includes/head.html file right before the closing </head> tag.
Plausible Analytics (The Privacy-First Alternative)
Plausible is an open-source, lightweight alternative to Google Analytics tailored perfectly for modern static sites out of the box.
Pros of Plausible for ZeroPress:
- Privacy by Design: Plausible does not use cookies and does not collect personal data. This means you do not need a heavy, annoying Cookie Consent banner on your beautiful new site.
- Incredibly Lightweight: The Plausible script is under 1KB. It will not impact your Core Web Vitals or page speed at all.
- Simple Dashboard: You get all the essential metrics (unique visitors, page views, bounce rate, top referrers) on a single, clean page without needing a tutorial.
Cons of Plausible:
- Cost: Plausible is a paid service (starting around $9/month).
- Less Granular: If you are running complex e-commerce funnels with multi-touch attribution models, Plausible’s simplicity will hold you back.
How to Install in Jekyll:
Paste the 1-line script into the _includes/head.html file right before the closing </head> tag.
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js"></script>
The ZeroPress Recommendation
For the vast majority of blogs, portfolios, and corporate sites migrating from WordPress, we strongly recommend a privacy-first analytics tool like Plausible (or Fathom).
The primary goal of going static is gaining extreme speed and providing a clean user experience. Using a tracker that doesn’t respect privacy and requires a slow cookie banner defeats those goals.