Script options
The script is under 2 KB compressed and loads from https://dev.ncrmb.com. It sets no cookies and
stores nothing in the browser. Options are attributes on the script tag.
| Attribute | What it does |
|---|---|
data-domain | Required. The domain of the site, as added in Nocrumbs. |
data-outbound | Records a click on a link to another site as an Outbound Link event, with the link address. |
data-downloads | Records a click on a file link, such as a PDF, ZIP, or MP4, as a File Download event. |
data-hash | For sites that route with the URL fragment (/#/pricing): each route counts as its own page. |
data-dnt | Skips visitors whose browser sends Do Not Track. |
A tag with outbound links and downloads turned on:
<script defer data-domain="example.com" data-outbound data-downloads
src="https://ncrmb.com/s.js"></script>
Single-page apps
The script follows route changes made with the History API, so React, Vue, Svelte, and
similar apps count each page without extra code. Hash routing needs data-hash.
When events are sent
Events are sent in small batches every 2 seconds, and at once when the visitor leaves the page, so nothing is lost when a tab closes.