🎉 GHOST v2 is live — Faster insights, smarter analytics
GHOST Logo

Installation

Installation Guide

Get started with GHOST Analytics in minutes. Track page views, user behavior, and engagement automatically.

Quick Start

Add GHOST to your website in 2 simple steps

Step 1: Get your API Key

Sign up for a free account and create a project to get your unique API key.

Get Started Free

Step 2: Add the script to your website

Copy and paste this code before the closing </body> tag:

<script src="https://cdn.useghost.de/ghost.js"></script>
<script>
  ghost.init("YOUR_API_KEY");
</script>

Replace YOUR_API_KEY with your actual API key from your dashboard.

Framework-Specific Examples

Choose your framework for detailed integration instructions

Add the script tags to your HTML file, typically before the closing </body> tag.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My Website</title>
</head>
<body>
  <h1>Welcome to my website</h1>
  
  <!-- GHOST Analytics -->
  <script src="https://cdn.useghost.de/ghost.js"></script>
  <script>
    ghost.init("YOUR_API_KEY");
  </script>
</body>
</html>

What Gets Tracked Automatically

GHOST tracks these metrics automatically - no configuration needed

AutomaticPage Views

Every page visit is tracked automatically with URL, referrer, and timestamp.

AutomaticScroll Depth

Tracks how far users scroll (25%, 50%, 75%, 100%) to measure engagement.

AutomaticTime on Page

Measures how long users spend on each page.

AutomaticDevice & Browser

Detects browser, OS, screen size, and device type automatically.

AutomaticGeographic Data

Identifies country and city based on IP address (privacy-friendly).

CustomCustom Events

Track form submissions and any custom user actions.

Best Practices

1. Place script before closing </body> tag

This ensures the script doesn't block page rendering and loads asynchronously.

2. Use environment variables for API keys

In production, store your API key in environment variables to keep it secure.

3. Track meaningful custom events

Use custom events to track important user actions like sign-ups, purchases, or feature usage.

4. Test in development first

Verify the script loads correctly and events are tracked before deploying to production.

Privacy & Compliance

✅ GDPR Compliant

GHOST doesn't use cookies or store personal data. All tracking is session-based and anonymous.

✅ No Cookies

We don't set any cookies, so no cookie consent banner is required.

✅ Anonymous by Default

All data is collected anonymously. We don't track IP addresses or personal identifiers.

GHOST

Simple, privacy-friendly analytics for SaaS founders. Track usage, spot drop-offs, and optimize your product.

Built by @lukastypeshit
Instagram • TikTok • YouTube

GHOST © 2025. All rights reserved.