Installation
Installing Assumetr requires placing a lightweight JavaScript snippet on your website. The snippet runs in the browser, observes events, and routes them to the Assumetr ingest service according to your Privacy Controls.
Privacy by default
The snippet does not use cookies, localStorage, or any persistent tracking mechanisms unless you configure optional features. It observes browser events and forwards them over HTTPS.
1. Retrieve Your Snippet
- Go to your Assumetr Dashboard.
- Navigate to Sites → Select your site.
- Click the Setup tab to view your unique snippet and API key.
2. Install the Snippet
Option A — CDN (recommended)
Place the following in the <head> of your HTML before any other scripts:
<script
src="https://cdn.assumetr.com/assumetr.min.js"
integrity="sha384-<YOUR_SRI_HASH>"
crossorigin="anonymous"
data-assumetr-key="YOUR_SITE_API_KEY"
defer
></script>Replace YOUR_SITE_API_KEY with the API key from the Setup tab, and <YOUR_SRI_HASH> with the current hash from the release manifest.
Pinned releases
If you need a reproducible, pinned version, use the content-hashed URL from the manifest (e.g. assumetr-a1b2c3d4.min.js). This URL is immutable and safe to cache indefinitely.
Option B — npm
If you manage your front-end dependencies with npm:
npm install @assumetr/trackerimport { init } from '@assumetr/tracker'
init({ apiKey: 'YOUR_SITE_API_KEY' })The npm package includes TypeScript declarations.
3. Content Security Policy (CSP)
If your site uses a Content Security Policy, add the following directives:
script-src 'self' https://cdn.assumetr.com;
connect-src 'self' https://ingest.assumetr.com;If you use integrity= / crossorigin= on the script tag (recommended), no 'unsafe-inline' directive is needed.
4. Verify Installation
After deploying, open your browser's developer console and visit any page:
- In the Network tab, filter for requests to
ingest.assumetr.com— you should see aPOST /erequest with status 200. - In the Assumetr Dashboard, navigate to Traffic for your site — a
pageviewevent should appear within 5–10 seconds. - Check the Evidence & Audit Trail tab to confirm the event is recorded.
If you see no events after 60 seconds, check the Troubleshooting guide.
Environments
Create separate Sites in Assumetr for each deployment environment:
| Environment | Purpose |
|---|---|
| Production | Live evidence collection for compliance |
| Staging | Test your integration before going live |
| Development | Optional; use a local ingest endpoint |
Keeping environments separate ensures your compliance evidence is not polluted by test traffic.