Skip to content

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

  1. Go to your Assumetr Dashboard.
  2. Navigate to Sites → Select your site.
  3. Click the Setup tab to view your unique snippet and API key.

2. Install the Snippet

Place the following in the <head> of your HTML before any other scripts:

html
<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:

bash
npm install @assumetr/tracker
js
import { 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:

  1. In the Network tab, filter for requests to ingest.assumetr.com — you should see a POST /e request with status 200.
  2. In the Assumetr Dashboard, navigate to Traffic for your site — a pageview event should appear within 5–10 seconds.
  3. 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:

EnvironmentPurpose
ProductionLive evidence collection for compliance
StagingTest your integration before going live
DevelopmentOptional; use a local ingest endpoint

Keeping environments separate ensures your compliance evidence is not polluted by test traffic.