Script Installation
Full reference for the Pulse tracking script, configuration attributes, and auto-tracked events.
The Pulse tracking script is a single <script> tag. Most sites need only data-domain — everything else has sensible defaults.
<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 (required) | location.hostname minus www. |
data-api | API endpoint URL | https://pulse-api.ciphera.net |
data-no-scroll | Disable automatic scroll depth tracking | — |
data-no-outbound | Disable automatic outbound link tracking | — |
data-no-downloads | Disable automatic file download tracking | — |
Boolean attributes are enabled by their presence — no value is needed:
<script defer data-domain="example.com" data-no-scroll data-no-outbound
src="https://js.ciphera.net/script.js"></script>Auto-tracked events
All of the following are enabled by default. Use the corresponding data-no-* attribute to opt out.
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. Appears in the dashboard 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.
Privacy signals
The script respects the following browser privacy signals and will not send analytics data if either is set:
- Do Not Track (
navigator.doNotTrack === "1") - Global Privacy Control (
navigator.globalPrivacyControl === true)
WebDriver automation is also detected and excluded, so synthetic test traffic does not pollute your data.
Self-exclusion
To exclude your own visits from analytics, navigate to yoursite.com/?pulse-ignore. This toggles a flag in localStorage under the key pulse_ignore. Visit the same URL again to re-enable tracking for your session.
Note
Self-exclusion is per-browser and per-device. If you clear local storage or switch browsers, you'll need to set it again.
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>All configuration attributes have equivalent camelCase keys in pulseConfig (data-no-scroll → noScroll, etc.).