siteId is the workspace id shown on the dashboard’s Analytics > Web page.
That’s the whole setup. When the client is created in a browser it tracks
pageviews (including SPA route changes via pushState/replaceState/
popstate/hashchange and back-forward cache restores), pageleaves, and
sessions on its own. No cookies, no fingerprinting: a random visitor id in
localStorage and a session id that rotates after 30 idle minutes.
In Next.js, import the client from a client component that the root layout
renders - otherwise nothing runs in the browser. Tracking is a no-op during
SSR and in server code.
Custom events
Signup with prop plan=pro.
Options
Good to know
- Visitors can opt out on their own machine with
localStorage.rwa_disable = "1". - Automation (
navigator.webdriver) is never tracked. - If the
wa.jsscript tag is also on the page, whichever loads first wins - nothing double-counts.