> DOCS

Up and running in one tag.

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.

During the beta, site IDs are registered manually. The script is safe to ship before that: 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 also records the previous in-site page for every view, which powers navigation-flow reporting.

Custom events

Count any interaction with one call. Events appear on your dashboard alongside pageviews.

window.motionAnalytics.track("Signed up")

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.

The privacy model

No cookies. No localStorage. No fingerprinting. No personal data at rest. Each pageview is attributed to a visitor hash computed from the request with a salt that rotates at midnight UTC, so a visitor cannot be recognised from one day to the next and an IP address is never stored. That is what lets you run analytics without a consent banner.

Counts are exact at typical traffic levels and become statistical estimates at very high volume, where per-site sampling keeps queries fast. See it all working on the live demo, which is this product pointed at motion.dev's real traffic.