Integration guides
Add VisitTrack analytics to any platform
<head> — the guides below show exactly where that is on 29 platforms, from Next.js and Laravel to Webflow, Shopify and Google Tag Manager, plus how page navigation, custom events and revenue work on each.Updated
The whole install, on every platform
Replace SITE_ID with the id shown when you add your site. The ~5 KB script records pageviews, client-side route changes, referrers and UTM campaigns, outbound clicks, scroll depth and Web Vitals — no cookies required in cookieless mode.
<script defer data-site="SITE_ID" src="https://visitrack.app/tracker.js"></script>Frameworks
JavaScript frameworks and single-page apps. Client-side route changes are tracked automatically.
- Next.js2 minAdd VisitTrack to a Next.js App Router or Pages Router app with next/script — client-side route changes are tracked automatically.
- React2 minAdd VisitTrack to a React single-page app (Vite, Create React App) through index.html — React Router navigations are tracked automatically.
- Vue2 minAdd VisitTrack to a Vue 3 app built with Vite by adding one tag to index.html — Vue Router history-mode navigations are tracked automatically.
- Nuxt2 minAdd VisitTrack to Nuxt 3 or Nuxt 4 through app.head in nuxt.config.ts — rendered on the server, with client-side route changes tracked automatically.
- SvelteKit2 minAdd VisitTrack to SvelteKit by adding one tag to src/app.html — client-side navigations are tracked, and kit.csp gets two extra sources.
- Astro2 minAdd VisitTrack to Astro with one is:inline tag in your shared layout — works for static, SSR and ClientRouter (view transitions) sites.
- Remix2 minAdd VisitTrack to Remix or React Router v7 (framework mode) in app/root.tsx — server-rendered once, with client navigations tracked automatically.
- Angular3 minAdd VisitTrack to an Angular app in src/index.html — Router navigations are tracked automatically with the default path location strategy.
Website builders
No-code builders and hosted stores. Paste one tag into the platform's custom code setting.
- Webflow2 minAdd VisitTrack to Webflow in Site settings → Custom code → Head code, then publish — plus custom attributes for goals and Stripe Payment Link revenue.
- Framer2 minAdd VisitTrack to Framer in Site Settings → General → Custom Code (End of <head> tag) — Framer's client-side page changes are tracked automatically.
- Wix3 minAdd VisitTrack to Wix in Settings → Custom Code: All pages, Head, load once — Wix's client-side page changes are tracked automatically.
- Squarespace2 minAdd VisitTrack to Squarespace 7.1 in Pages → Website Tools → Code Injection → Header, on Core, Plus or Advanced plans.
- Shopify5 minAdd VisitTrack to a Shopify store in theme.liquid, track add-to-cart clicks, and send paid orders back as events — with honest notes on checkout limits.
- Bubble3 minAdd VisitTrack to a Bubble app in Settings → SEO / metatags → Script/meta tags in header, exclude /version-test, and fire events from workflows.
- Carrd3 minAdd VisitTrack to a Carrd site with a hidden Embed element placed in the head (Pro Standard and up) — plus outbound clicks and Stripe Payment Links revenue.
CMS & blogs
Content management systems, newsletters and hosted docs.
- WordPress3 minAdd VisitTrack to WordPress with a header-code plugin or a wp_head hook — works with block themes, caching plugins and WooCommerce.
- Ghost3 minAdd VisitTrack to Ghost in Settings → Code injection → Site header (every Ghost(Pro) plan and self-hosted) and count confirmed member signups.
- Mintlify3 minAdd VisitTrack to Mintlify docs with a custom .js file in your docs repo — page changes tracked, and docs.example.com shares visitors with your main site.
Static site generators
Add the tag once to the base template or head partial.
- Hugo3 minAdd VisitTrack to a Hugo site through your theme's head partial, loaded only in production with hugo.IsProduction, plus a shortcode for goals.
- Jekyll3 minAdd VisitTrack to Jekyll (and GitHub Pages) through _includes/head.html or Minima's custom-head.html, production-only via jekyll.environment.
- Docusaurus2 minAdd VisitTrack to Docusaurus with the scripts array in docusaurus.config — data attributes supported, client-side navigation tracked automatically.
- Gatsby3 minAdd VisitTrack to Gatsby with setHeadComponents in gatsby-ssr — rendered into every page's head, with Gatsby Link navigations tracked automatically.
Backend frameworks
Server-rendered apps: the base layout template, plus server-side events for signups and payments.
- Laravel5 minAdd VisitTrack to Laravel in your Blade layout with @production, send signups from a Registered listener, and attribute Cashier Stripe Checkout revenue.
- Django5 minAdd VisitTrack to Django in base.html via a context processor, allow it in Django 6's built-in CSP, and send signups and Stripe revenue from views.
- Ruby on Rails5 minAdd VisitTrack to Rails in application.html.erb — Turbo Drive visits tracked — with CSP initializer settings, Devise signups and Stripe Checkout revenue.
Hosting
Hosting platforms: preview deployments, headers and CSP, and where the tag really belongs.
- Vercel3 minUse VisitTrack on Vercel: add the tag in your framework, keep preview deployments out with VERCEL_ENV or allowed hostnames, and set CSP headers.
- Netlify2 minAdd VisitTrack on Netlify with Snippet injection (no code) or in your framework, keep deploy previews out, and set CSP in _headers.
- Cloudflare Pages3 minAdd VisitTrack on Cloudflare Pages in your HTML or with an HTMLRewriter middleware, exclude it from Rocket Loader, and track AI crawlers at the edge.
Tag managers
Load VisitTrack without touching your site's code.
Integration FAQ
Does VisitTrack work on platforms that aren't listed here?
Yes. VisitTrack is one script tag, so it works on any site where you can add a script to the page's head — a custom template, a CMS's header setting or a tag manager. The install docs cover the generic setup.
Is there an npm package or plugin I need to install?
No. There's no npm package, no WordPress plugin and no Shopify app to install: every guide comes down to the same tag with your site id. Framework guides only differ in which file renders the page head.
Are single-page app route changes tracked?
Yes. The tracker listens to the History API (pushState, replaceState and popstate), so client-side navigation in Next.js, React Router, Vue Router, SvelteKit, Nuxt, Framer, Wix and similar is counted without extra code. Hash-based routing (/#/page) is the exception.
How big is the VisitTrack script?
About 5 KB gzipped. It loads with defer, never blocks rendering, and the session-replay recorder is only downloaded for sites that turn replays on and for the sampled share of visits.
Do I need a cookie banner?
Not in cookieless mode, which stores nothing on the visitor's device. The default standard mode keeps a first-party visitor id, which in the EU and UK generally requires consent. This is general information, not legal advice.
Related
- Install the tracking scriptThe reference install, CSP notes and checks.
- Script configurationEvery data- attribute, cross-domain and exclusions.
- Custom events and signupsTrack conversions with one line of code.
- Revenue attributionStripe, Polar, Lemon Squeezy, Paddle and Razorpay.
- Use casesSaaS, indie hackers, e-commerce, agencies and more.
- VisitTrack vs Google AnalyticsWhat changes when you switch.
See which channels actually bring paying customers
VisitTrack is cookie-free analytics with revenue attribution built in. One script tag, no consent banner, live in two minutes. 14 days free, no card required.
14-day free trial · No card required · Cookie-free · Cancel anytime
Or explore the live demo first →