Quick Start
Get Pulse Analytics running on your website in under 60 seconds. No build tools, no package managers — just one line of code.
1. Add the tracking script
Add this single script tag to the <head> of your HTML:
<script
src="https://pulse.js/t.js"
data-site="YOUR_SITE_ID"
defer
></script>2. That's it
Pulse automatically begins tracking page views, scroll depth, Core Web Vitals, device information, referrers, and more. No additional configuration needed.
Zero Configuration Required
The script is only 1.2KB gzipped and loads asynchronously. It won't affect your page load performance. No cookies are used, so no consent banner is needed.
Framework Integration
React / Next.js
// app/layout.tsx or pages/_app.tsx
import Script from 'next/script'
export default function Layout({ children }) {
return (
<html>
<head>
<Script
src="https://pulse.js/t.js"
data-site="YOUR_SITE_ID"
strategy="afterInteractive"
/>
</head>
<body>{children}</body>
</html>
)
}Vue / Nuxt
<!-- nuxt.config.ts -->
export default defineNuxtConfig({
app: {
head: {
script: [
{
src: 'https://pulse.js/t.js',
'data-site': 'YOUR_SITE_ID',
defer: true
}
]
}
}
})WordPress
// Add to your theme's functions.php
function pulse_analytics_script() {
wp_enqueue_script(
'pulse-analytics',
'https://pulse.js/t.js',
array(),
null,
false
);
wp_script_add_data('pulse-analytics', 'defer', true);
}
add_action('wp_enqueue_scripts', 'pulse_analytics_script');Custom Events
Track any user interaction by calling the Pulse event API. Events appear in your dashboard within seconds.
// Track a simple event
pulse('event', 'signup_click')
// Track with properties
pulse('event', 'purchase', {
plan: 'pro',
value: 29,
currency: 'USD'
})
// Track form submission
document.querySelector('#contact-form')
.addEventListener('submit', () => {
pulse('event', 'contact_form_submit')
})
// Track outbound links automatically
// (enabled by default, no code needed)Goal Tracking
// Define a conversion goal
pulse('goal', 'trial_started', {
source: 'pricing_page',
plan: 'pro'
})
// Track revenue
pulse('revenue', {
amount: 29.00,
currency: 'USD',
orderId: 'ORD-12345'
})Configuration
Customize Pulse behavior with data attributes on the script tag.
| Attribute | Default | Description |
|---|---|---|
| data-site | required | Your unique site identifier |
| data-auto-track | true | Automatically track page views |
| data-scroll-depth | true | Track scroll depth on all pages |
| data-web-vitals | true | Collect Core Web Vitals metrics |
| data-outbound-links | true | Track outbound link clicks |
| data-file-downloads | true | Track file download clicks |
| data-hash-mode | false | Track hash-based routing changes |
| data-domain | auto | Override the tracked domain |
| data-api | https://api.pulse.js | Custom API endpoint |
Privacy
Pulse Analytics is built with privacy as a core principle. We collect only the data necessary to provide useful analytics, and we never track individual users across websites.
API Reference
Access your analytics data programmatically with the Pulse REST API.
Authentication
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.pulse.js/v1/sites/YOUR_SITE_ID/statsGet Site Stats
GET /v1/sites/:site_id/stats?period=30d
Response:
{
"visitors": 274320,
"pageviews": 1723450,
"sessions": 445120,
"bounce_rate": 42.7,
"avg_duration": 450,
"engagement_score": 78.4
}Get Top Pages
GET /v1/sites/:site_id/pages?period=30d&limit=10
Response:
{
"pages": [
{
"path": "/",
"title": "Homepage",
"views": 99520,
"visitors": 54200,
"avg_time": 45,
"scroll_depth": 72
}
]
}