Install & reference
Add VisitVerity to any website with a single script tag. No build step, no cookies required.
Quick start
- Get your project key. Sign in and open the setup wizard (or Settings) to create a project — you'll get a key like
px_…. - Add the snippet to the
<head>of your site and replacepx_your_project_keywith your key. - Load a page. Your first visit appears in the dashboard within a few seconds.
<script src="https://visitverity.com/tracker.js" data-project-id="px_your_project_key" data-collector-url="https://visitverity.com/collect/v1/batch" defer></script>
Install by platform
Plain HTML
Paste the Quick-start snippet just before the closing </head> tag on every page you want to measure.
Next.js
Use next/script in your root layout:
import Script from "next/script";
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<Script
src="https://visitverity.com/tracker.js"
strategy="afterInteractive"
data-project-id="px_your_project_key"
data-collector-url="https://visitverity.com/collect/v1/batch"
/>
</body>
</html>
);
}React (Vite / CRA)
Add the Quick-start snippet to your index.html <head>. The tracker follows client-side route changes automatically.
WordPress
Paste the snippet into your theme's header (Appearance → Theme File Editor → header.php, before </head>) or use any “header scripts” plugin.
With session replay
To enable masked session replay, add the replay attributes:
<script src="https://visitverity.com/tracker.js" data-project-id="px_your_project_key" data-collector-url="https://visitverity.com/collect/v1/batch" data-replay="true" data-replay-script-url="https://visitverity.com/rrweb.min.js" data-consent="granted_by_default" defer></script>
Configuration
The script tag accepts these data- attributes:
data-project-idrequiredYour public project key (starts with px_). Find it in the setup wizard or Settings.data-collector-urlrecommendedWhere events are sent. Use the value shown in your install snippet.data-replayoptionalSet to "true" to enable masked session replay.data-replay-script-urloptionalAbsolute URL of the rrweb library when replay is on (self-hosted).data-consentoptionalConsent mode: "off", "required" (opt-in), or "granted_by_default" (opt-out).JavaScript API
Once loaded, the tracker is available as window.Tracker:
// Custom event with properties
window.Tracker.track("signup_completed", { plan: "pro" });
// Link an anonymous visitor to your own user id (never PII you don't want stored)
window.Tracker.identify("user_123");
// Manual page view (SPAs are auto-tracked, but you can send your own)
window.Tracker.page();
// Consent controls (see the Consent section)
window.Tracker.grantConsent();
window.Tracker.revokeConsent();Consent & privacy
VisitVerity is cookieless and masks sensitive data by default. You control tracking with data-consent:
off— track normally (default).granted_by_default— track unless the visitor opts out. Callwindow.Tracker.revokeConsent()from your banner's “Decline”.required— do not track until the visitor opts in. Callwindow.Tracker.grantConsent()from your banner's “Accept”.
Revoking consent stops all tracking and clears the anonymous visitor id. The choice is remembered in localStorage.
Never collected: input values, passwords, typed text, cookies, tokens, or raw IP addresses. IPs are turned into keyed, anonymized network hashes and discarded; session replay masks all inputs.