Analytics
Track your site's performance and understand your audience with analytics tools.
Ghost's Built-in Analytics#
Ghost includes basic analytics for member activity:
- Go to Dashboard in Ghost admin
- View metrics for:
- Total members
- Paid subscribers
- Email open rates
- Click-through rates
Google Analytics 4#
Setup#
- Create a Google Analytics 4 property
- Get your Measurement ID (starts with
G-) - Add to Code Injection in Site Header:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
Replace G-XXXXXXXXXX with your Measurement ID.
Privacy-Focused Alternatives#
Plausible Analytics#
Plausible is a lightweight, privacy-friendly alternative to Google Analytics.
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js"></script>
Features:
- No cookies
- GDPR compliant
- Simple dashboard
- Fast loading (~1KB)
Fathom Analytics#
<script src="https://cdn.usefathom.com/script.js" data-site="ABCDEFGH" defer></script>
Simple Analytics#
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
Umami (Self-Hosted)#
For complete data ownership, use Umami:
<script async src="https://your-umami-app.com/script.js" data-website-id="YOUR-ID"></script>
Verifying Installation#
To check if analytics is working:
- Install the analytics code
- Visit your site in a new browser/incognito window
- Check your analytics dashboard for real-time data
- Verify the tracking code loads in browser developer tools
Privacy Considerations#
GDPR & Privacy: If you serve visitors from the EU, ensure your analytics setup complies with GDPR. Consider using privacy-focused alternatives or implementing a cookie consent banner.
Cookie Consent#
If using Google Analytics, you may need a cookie consent banner. Many solutions are available:
Performance Impact#
Different analytics tools have varying impacts on page speed:
| Tool | Script Size | Cookies |
|---|---|---|
| Google Analytics 4 | ~45KB | Yes |
| Plausible | ~1KB | No |
| Fathom | ~2KB | No |
| Simple Analytics | ~6KB | No |
Performance Tip: Add async or defer attributes to analytics scripts to prevent blocking page rendering.
What to Track#
Focus on metrics that matter:
- Page views — Which content performs best
- Traffic sources — Where visitors come from
- Engagement — Time on site, bounce rate
- Conversions — Newsletter signups, purchases
- Geography — Where your audience is located