Up and running in one tag
Install the tracker, single-page app behaviour, local development and plan limits.
Install
Add the tracker to the document head of every page. In most frameworks that is your root layout or HTML template. Set data-site to your production hostname.
<script defer src="https://analytics.motion.dev/tracker.js" data-site="example.com"></script>Or let your agent do it. The prompt covers the script tag, single-page app behaviour and custom events.
Register your site in your dashboard, then drop in the tag. The script is safe to ship before then: it costs one tiny request and starts recording the moment your site is registered.
Single-page apps
Route changes through the History API are tracked automatically: no framework adapter, no configuration. The tracker patches pushState and replaceState and listens for popstate, so React Router, Vue Router, SvelteKit and the rest just work. It also records the previous in-site page for every view, which powers navigation-flow reporting, and flushes the outgoing view's performance metrics before the path advances.
Local development
The tracker no-ops on localhost and private LAN hosts, so you can ship the same tag in every environment. The collect endpoint also verifies that each beacon's browser origin matches its site, so neither local machines nor third-party pages can pollute your numbers. Need to see it fire locally? Add data-dev to the script tag to opt that page back in.
Plan limits
Pageviews are shared across all of your sites. Audits are the on-demand MotionScore runs you can trigger from a site.
| Tier | Pooled pageviews a month | On-demand audits a month |
|---|---|---|
| Free | 25k | 0 |
| Pro | 250k | 30 |
| Scale | 2M | 100 |
Going over never drops data. Collection always continues.