Skip to main content
Scripts

Pulse Analytics

Pulse is cookie-free web analytics by Ciphera. The tracker leaves nothing in the browser, no cookie and no stored identifier; Pulse works out who a visitor is on its own servers, from rotating hashes. It honours Do Not Track and Global Privacy Control without extra config. The script reference lists every attribute this composable maps.

Pulse Analytics

View source

Nuxt Config Setup

Add this to your nuxt.config.ts to load Pulse Analytics globally. Alternatively you can use the useScriptPulseAnalytics composable for more control.

export default defineNuxtConfig({
  scripts: {
    registry: {
      pulseAnalytics: {
        trigger: 'onNuxtReady',
      }
    }
  }
})

This config automatically enables first-party mode (bundle). See below to customise.

useScriptPulseAnalytics()

The useScriptPulseAnalytics composable lets you have fine-grain control over when and how Pulse Analytics is loaded on your site.

const { proxy } = useScriptPulseAnalytics()

Please follow the Registry Scripts guide to learn more about advanced usage.

First-Party Mode: Privacy Focused Proxy

No extra config needed. The script is bundled and served from your domain instead of a third-party CDN, eliminating an extra DNS lookup and improving load times. Learn more.

Mode
Bundle
export default defineNuxtConfig({
  scripts: {
    // ✅ First-party mode: bundled
    registry: {
      pulseAnalytics: {
        trigger: 'onNuxtReady',
      },
    },
  },
})

Example

Using Pulse Analytics in a component.

ConversionButton.vue
<script setup lang="ts">
const { proxy } = useScriptPulseAnalytics()

// noop in development, ssr
// just works in production, client
function handleAction() {
  // use proxy methods here
}
</script>

<template>
  <div>
    <button @click="handleAction">
      Send Event
    </button>
  </div>
</template>

Proxying is not supported

Pulse builds visitor identity on its server from the connecting IP address and user agent. Route the beacons through your Nuxt server and they all arrive from one IP, so every visitor on the same user agent collapses into a single identity. Its bot filtering counts a datacenter or hosting-provider origin as a signal too, which is where a proxied server sits.

So Nuxt Scripts bundles the tracker and serves it from your origin, but its beacons go straight to the Pulse API. Nothing is lost client-side: the tracker keeps no identifier in the browser for a first-party proxy to shield.

Self-hosted or proxied API

apiUrl sets the origin the tracker posts to. Leave it unset for the hosted Pulse API.

useScriptPulseAnalytics({
  domain: 'YOUR_DOMAIN',
  apiUrl: 'https://pulse-api.example.com',
})

Custom events

Use the composable's proxy object for track calls. Call it before the script has loaded and Nuxt Scripts holds the call, then replays it once the tracker is in. If the visitor has opted out, the tracker never runs and the queue is dropped.

const { proxy } = useScriptPulseAnalytics()
function trackSignup() {
  proxy.track('signup', { plan: 'pro' })
}

Event names may contain letters, numbers and underscores. Property values must be strings, and the optional third argument is revenue. See the custom events reference.

domainstring required

The site domain as registered in Pulse.

apiUrlstring = 'https://pulse-api.ciphera.net'

The API origin the tracker posts events to. Only needed for a self-hosted or reverse-proxied Pulse API.

trackScrollboolean = true

Record scroll depth.

trackOutboundboolean = true

Record outbound link clicks as `outbound_link` events.

trackDownloadsboolean = true

Record file download clicks as `file_download` events.

Example

The default trigger waits until Nuxt is ready:

app.vue
<script setup lang="ts">
useScriptPulseAnalytics({
  domain: 'YOUR_DOMAIN',
})
</script>
Was this page helpful?