Quick start — vanilla snippet
Works with any site: Next.js, plain HTML, WordPress, or anything else that lets you add a script tag to the page <head>.
1. Copy your tracking ID
In your Antlytics dashboard, go to Settings → Tracking Snippet. The snippet is pre-filled with the tracking ID for the currently selected site in the sidebar.
2. Add the snippet to your site
Paste the snippet into every page you want to track, inside the <head> tag. Replace YOUR_TRACKING_ID with your actual UUID.
The block below matches what the dashboard generates for your app base URL (including UTM parameters read from the page query string):
<script
defer
src="https://www.antlytics.com/tracker.js"
data-tracking-id="YOUR_TRACKING_ID"
data-api-host="https://www.antlytics.com"
></script>
The hosted tracker posts to /api/ingest/pageview (plus engagement and custom-event endpoints when used) on your Antlytics host.
The tracker fires on initial load and patches history.pushState / replaceState (plus popstate) so SPA navigations are captured. No identity cookies are set. The visit ID lives only in sessionStorage (30-minute idle timeout) and clears when the tab closes.
3. Verify data is flowing
Visit your live site, then open Overview in your Antlytics dashboard. Pageviews and charts appear within seconds after you reload. On Starter and Pro, the real-time visitor count in the header updates within about half a minute.
Free includes Overview, Pages, and Referrers with a 30-day history window. See Plans & limits.