GhostStat
Community
Loading…
Open the forum
Settings · your site

Install tracking code

Site settings

Paste this snippet just before the closing </head> tag on every page you want to measure. It's a tiny, cookieless script — no consent banner needed.

Your tracking snippet
Loading your snippet…
Cookieless ✓ SPA route tracking ✓ Batched + offline queue ✓
Waiting for first pageview…
Install guides

Step-by-step for your platform, with your own snippet filled in.

Install guide
Check that it works

Open your site in another tab and load a page, then verify here.

Once installed, your data appears on the dashboard within seconds.
Go to dashboard
Add GhostStat to your app

Your app sends screens, events and a "still here" heartbeat to GhostStat. Visitors are counted like on your website — no cookies, no advertising or device IDs, nothing that identifies the phone — so no tracking prompt (ATT) is needed.

1. Add the Swift package

Download GhostStatSDK and unzip it next to your project. In Xcode choose File → Add Package Dependencies… → Add Local…, pick the GhostStatSDK folder and add the GhostStat library to your app. It needs iOS 16 or later and has no dependencies.

Download GhostStatSDK 1.2.0 (.zip) The README inside explains every call.

2. Start it when the app launches

import SwiftUI
import GhostStat

@main
struct MyApp: App {
    init() {
        GhostStat.configure(siteKey: "…")
    }
    var body: some Scene { WindowGroup { ContentView() } }
}

3. Name your screens and events

SettingsView()
    .gsScreen("Settings")

GhostStat.event("signup_completed", props: ["plan": "pro"])

4. Deep links bring their campaign along

.onOpenURL { url in GhostStat.handle(url: url) }   // utm_* from the link

5. Why it crashed (optional)

With SDK 1.2 each crash, hang and slow launch arrives with its reason and stack. Release builds have no function names in them: upload the dSYMs of each release (Xcode → Organizer → the archive → Show in Finder → dSYMs, zipped) to see functions, files and lines. From CI: make an upload key on the same page. App Insights → Symbol files

No cookies ✓ No device IDs ✓ Batched + offline ✓
Waiting for the first screen…
    App Store privacy label (iOS)
    Usage Data → Product Interaction, and with App health (on by default) also Diagnostics → Crash Data and Performance Data. Not linked to the user. Not used for tracking.
    Google Play Data safety
    App activity → App interactions, and with App health (on by default) also App info and performance → Crash logs and Diagnostics. Not shared, not linked to the user, no advertising ID.
    Hybrid apps (Capacitor, WebView) can also use the website snippet.