Script Installation
Full reference for the Pulse tracking script, configuration attributes, and auto-tracked events.
The Pulse tracking script is a single <script> tag, and it is the same for every site. The tag names your site, and what the script counts is set in Settings → General, so you never replace the tag after changing a setting.
<script defer data-domain="example.com" src="https://js.ciphera.net/script.js"></script>Configuration attributes
| Attribute | Purpose | Default |
|---|---|---|
data-domain | Site domain as registered in Pulse | location.hostname minus www. |
data-api | API endpoint URL | https://pulse-api.ciphera.net |
Set data-domain explicitly if it might differ from the page's own hostname. Left off, the script falls back to the default shown above — but if that auto-detected value doesn't match a domain registered in Pulse, the event is dropped rather than recorded against the wrong site.
Everything else is a setting. Settings → General → What the script counts switches scroll depth, outbound links, file downloads and interaction capture on or off, and decides whether browsers that send Do Not Track or Global Privacy Control are counted. Pulse sends the script your settings in its answer to every pageview, so a change applies within a few minutes of saving. Pulse also keeps only what your settings allow, whatever a tag says.
Attributes from older tags
Until tracking script 1.9.0 these choices were attributes on the tag. A tag that still carries one keeps working, and you don't need to change it. The script ignores the attribute and follows your settings.
| Attribute | Now set with |
|---|---|
data-no-scroll | Scroll depth |
data-no-outbound | Outbound links |
data-no-downloads | File downloads |
data-ignore-dnt | Respect Do Not Track |
data-ignore-gpc | Respect Global Privacy Control |
Auto-tracked events
All of the following are on by default. You can switch off scroll depth, outbound links and file downloads, each on its own, in Settings → General. Pageviews have no switch.
Pageviews
Fired on initial load, and on every client-side navigation that changes the path. SPA support is built in: the script patches pushState and replaceState, and listens to popstate and a MutationObserver over the document to catch framework-rendered navigations.
Two rules decide whether something is a pageview:
- Only a path change counts. A rewrite that changes only the query string or the
#fragment is state on the same page, not a navigation — a filter, a sort, a selected tab or a product variant does not mint a pageview. - A hidden document waits. If the page loads while the tab is in the background, the pageview is held until the tab is first shown, and its time on page starts then. A tab that is never looked at is never counted.
Scroll depth
Fired continuously as the visitor scrolls, recording the maximum percentage of the page reached. In the dashboard, depth is taken per visit — the deepest point reached across every page that visit viewed — not per page.
Outbound links
Any click on a link pointing to a different domain fires an outbound_link event with the url property set to the full destination URL.
File downloads
Clicks on links matching tracked file extensions fire a file_download event with the url property. Tracked extensions:
pdf, zip, gz, tar, xlsx, xls, csv, docx, doc, pptx, ppt, mp4, mp3, wav, avi, mov, exe, dmg, pkg, deb, rpm, iso, 7z, rar
Links with a download attribute are also captured regardless of extension.
Interaction capture (optional)
A second, optional script records what a visitor did on a page as well as which page they saw: clicks, copies and form submits. It is a separate file, script.interactions.js. The tracking script loads it only when Clicks, copies and forms is on in Settings → General, and visitors download about 1 KB more while it is on. It is off by default, and there is no second tag to add.
Under the switch, Clicks, Copies and Forms sent choose which kinds it records.
The tracking script loads it from the same address it came from. If you serve the tracking script from your own site, put script.interactions.js beside it, or Pulse records no clicks, copies or form submits.
A site set up before tracking script 1.9.0 may still carry the companion's own tag:
<script defer src="https://js.ciphera.net/script.interactions.js"></script>That tag keeps working. A page runs only one copy of the companion, and Pulse keeps only the kinds your settings have on. You can remove the tag, because the tracking script loads the companion itself while the switch is on.
See interaction capture for what each kind records, what it never records, and how to exclude a specific element with data-pulse-ignore.
Privacy signals
By default the script respects these browser privacy signals:
- Do Not Track (
navigator.doNotTrack === "1") - Global Privacy Control (
navigator.globalPrivacyControl === true)
A browser that sends either one first asks Pulse for your site's settings. That request carries your domain alone, and Pulse stores nothing from it. If your site respects the signal, the script stops there and sends nothing at all. If the request fails, the script respects the signal as well.
You can count either kind of browser on your own site, each on its own. In Pulse, Settings → General → What the script counts has a Respect Do Not Track and a Respect Global Privacy Control switch. Turn one off and save, and the change applies within a few minutes. Your tag stays the same.
The two are separate because they are different signals. In 2023 a court in Berlin ruled that a browser's Do Not Track signal is a valid objection to the processing of personal data under the GDPR (Landgericht Berlin, 16 O 420/19; the judgment is not final). Global Privacy Control is a legal opt-out signal in California and several other US states. Switching either off is your decision as the site owner, and your privacy policy should match it. The text for your privacy policy in Settings → Privacy says you respect Do Not Track, so remove that sentence if you switch it off.
WebDriver automation is always detected and excluded, so synthetic test traffic does not pollute your data. That one cannot be switched off.
Self-exclusion
To exclude your own visits, open yoursite.com/?pulse-ignore=on. The browser keeps a flag in localStorage under the key pulse_ignore, and your site shows a short note saying so. Open yoursite.com/?pulse-ignore=off to be counted again. Opening either link again changes nothing. From tracking script 1.8.0 a bare ?pulse-ignore means on; earlier scripts switched the flag each time. From tracking script 1.7.0 this flag is the only thing the script keeps in the browser.
Note
Self-exclusion is per browser, per device and per site address. If you clear the site's data or switch browsers, set it again. Safari clears it by itself after 7 days without a visit.
Tag manager or no-attribute environments
If you are loading the script through Google Tag Manager or another system that does not support data-* attributes, configure Pulse via the global config object before the script loads:
<script>window.pulseConfig = { domain: "example.com" };</script>
<script defer src="https://js.ciphera.net/script.js"></script>pulseConfig takes the same two keys as the tag, domain and api. Everything else comes from your settings.