Prime Direction

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:

  1. Go to Dashboard in Ghost admin
  2. View metrics for:
    • Total members
    • Paid subscribers
    • Email open rates
    • Click-through rates

Google Analytics 4#

Setup#

  1. Create a Google Analytics 4 property
  2. Get your Measurement ID (starts with G-)
  3. 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:

  1. Install the analytics code
  2. Visit your site in a new browser/incognito window
  3. Check your analytics dashboard for real-time data
  4. 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.

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:

ToolScript SizeCookies
Google Analytics 4~45KBYes
Plausible~1KBNo
Fathom~2KBNo
Simple Analytics~6KBNo

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