Install on React

Add OpenWebTrack to React with Vite, CRA, or any SPA

Works with Vite, Create React App, and any React SPA. Add once, route changes are tracked automatically.

1

A React app has one HTML shell; the snippet goes into its <head> so it loads on every route.

index.html
<head>
  <script
    defer
    src="https://cloud.openwebtrack.one/script.js"
    data-website-id="YOUR_WEBSITE_ID"
    data-domain="yourdomain.com"
  ></script>
</head>

For cookieless use script.cookieless.js. For self-hosted replace cloud.openwebtrack.one with your ORIGIN.

2

React Router navigation is tracked automatically as pageviews. The tracker hooks history.pushState so no extra code is needed for client-side routes.

3

Deploy and open the site at the address you gave the dashboard. The realtime view shows the visit within seconds; if nothing appears, check that data-domain matches and that an ad blocker is not blocking the request.