Documentation / Getting Started
Getting Started
Add GhostlyX to your site in under two minutes. One script tag. No cookies. No personal data collected.
Privacy-first by design
GhostlyX sets no cookies and stores no personal data. Visitors are identified by a daily-rotating anonymous hash IP addresses are never written to the database. GPC and DNT signals are honoured automatically. Your visitors' privacy is protected the moment the script loads, with no configuration required.
What you'll do
Create an account
Sign up and add your first site. GhostlyX generates a unique tracking ID for it.
Install the snippet
Paste one script tag before </head> or use the WordPress plugin if you prefer.
View your data
Pageviews, visitors, and sources appear in your dashboard within seconds of the first hit.
Create an account and add your site
Sign up for a free GhostlyX account. After registering, click Add site from your dashboard and enter your domain (e.g. example.com). GhostlyX will generate a unique data-site-id for you.
Install the tracking snippet
Choose the method that suits your stack. The HTML snippet works on any site; the WordPress plugin handles the insertion automatically.
Copy the snippet below and paste it before the closing </head> tag on every page you want to track. Replace the placeholder values with your own domain and site ID, both of which are shown in your dashboard after adding a site.
<!-- Add before </head> -->
<script
defer
data-domain="your-domain.com"
data-site-id="gx_xxxxxxxxxxxx"
src="https://ghostlyx.com/js/script.min.js"
></script>
Your exact snippet with your real domain and site ID pre-filled is always available on the setup page and the snippet panel in your site's analytics dashboard.
Download the WordPress plugin from the integrations page in your dashboard. It is pre-configured with your domain and site ID no settings page to fill in.
- 1 Download the plugin zip from your site's setup page in the dashboard.
- 2 In WordPress admin, go to Plugins → Add New Plugin → Upload Plugin.
- 3 Upload the .zip file, click Install Now, then Activate.
- 4 The tracking snippet is now live on every page of your site.
https://ghostlyx.com to your script-src and connect-src directives, otherwise the browser will block the script and the beacon requests.
Verify and view your data
After installing the snippet, open your site in a browser tab. Within a few seconds you should see your first pageview appear. You can also use the Verify installation button on the setup page it polls your site for the tracking script and redirects you to your dashboard automatically once it detects a hit.
What you'll see in your dashboard
Single-page app support
The tracking script wraps history.pushState and listens for popstate events, so client-side navigation in React, Vue, Svelte, Next.js, Nuxt, and similar frameworks is tracked automatically. No extra configuration is needed.
Initial page load
Always tracked on script load.
history.pushState
Tracked on every programmatic navigation (e.g. React Router, Vue Router).
popstate
Tracked on browser back/forward navigation.
replaceState
Not wrapped avoids duplicate pageviews from URL clean-up calls made by WordPress and similar platforms.
Privacy behaviour
The script silently stops all tracking and exposes a no-op window.ghostlyx() function when any of the following conditions are true. These checks happen on the client before any network request is made, and are also enforced on the server.
navigator.globalPrivacyControl === true
The visitor's browser or extension has set the GPC signal. No data is sent.
navigator.doNotTrack === "1"
The visitor has enabled the legacy DNT preference. No data is sent.
ghostlyx('opt-out')
The visitor called the opt-out API. A flag is set in localStorage and persists across sessions.