Ciphera Docs
Pulse AnalyticsInstallationScript Installation

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

AttributePurposeDefault
data-domainSite domain as registered in Pulselocation.hostname minus www.
data-apiAPI endpoint URLhttps://pulse-api.ciphera.net
data-no-scrollDisable automatic scroll depth tracking—
data-no-outboundDisable automatic outbound link tracking—
data-no-downloadsDisable automatic file download tracking—

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.

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. Scroll depth, outbound links, and file downloads can each be turned off with the corresponding data-no-* attribute above; pageviews have no 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. In the dashboard, depth is taken per visit — the deepest point reached across every page that visit viewed — not per page.

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 — clicks, copies, and form submits — rather than only which page they saw. It ships separately from the core script and is absent from your site unless you add its own tag:

<script defer data-domain="example.com" src="https://js.ciphera.net/script.js"></script>
<script defer src="https://js.ciphera.net/script.interactions.js"></script>

All three kinds are on once that tag is added. Turn one off at a time with its own attribute, on the companion tag:

AttributeDisables
data-no-clicksButton and link clicks
data-no-copyCopy events
data-no-formsForm submits

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 the following browser privacy signals. If either is set, it sends nothing at all:

  • Do Not Track (navigator.doNotTrack === "1" or "yes", or navigator.msDoNotTrack === "1")
  • Global Privacy Control (navigator.globalPrivacyControl === true)

You can switch either one off for your own site, independently, with an attribute on your tag:

AttributeEffect
data-ignore-dntBrowsers that send Do Not Track are tracked
data-ignore-gpcBrowsers that send Global Privacy Control are tracked
<script defer data-domain="example.com" data-ignore-gpc src="https://js.ciphera.net/script.js"></script>

With a tag manager, set ignoreDnt: true or ignoreGpc: true in window.pulseConfig instead. A value of "false", "0", "no" or "off" on either attribute keeps the signal respected, so a framework that renders a false option as an attribute cannot turn it off by accident. Both need script v1.6.0 or later: the rolling js.ciphera.net/script.js has it, and a version-pinned tag needs the new version and its integrity hash.

The two are separate because they are different signals. Do Not Track has no legal force. 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 privacy policy snippet 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 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.).

On this page

On this page