PulseMetrics Documentation
Learn how to configure your organization, create telemetry projects, provision API keys, and track daily active users using the lightweight pulsemetrics-sdk client or universal REST endpoints.
Organization & Account Management
Team registration, authentication, settings, and session security
Registration & Onboarding
To start tracking daily active users, register an organization account on PulseMetrics.
- Organization Name: e.g., Apex Innovations
- Owner Full Name: First & Last name
- Work Email: For verification & alerts
- Mobile Phone: Verified administrative contact
Authentication & Login
Sign in to the PulseMetrics console using your registered organization email and password. Sessions are cryptographically authenticated with secure JWT tokens.
Profile & Company Settings
Manage your company profile attributes from Dashboard → Settings.
- Organization Name: Update the company display name across projects.
- Owner First & Last Name: Update administrative identity.
- Secondary Email: Optional backup for billing and operational notices.
- Landline Number: Optional office phone contact.
Primary Email and Primary Phone Number are permanently tied to your registration to prevent unauthorized account takeovers.
Security & Password Recovery
Ensure continuous workspace security with automated password evaluation and OTP recovery.
Enforces minimum 8 characters with upper, lower, digits, and symbols with live visual meter feedback.
Single-click password recovery sends a time-limited 6-digit verification code to your verified email.
Project Management & API Keys
Partitioning applications, lifecycle states, and token security
Creating a New Project
PulseMetrics partitions telemetry by project. Create isolated projects for production, staging, internal tools, or individual applications.
Navigate to Dashboard → Projects in the sidebar.
Click + New Project, enter name and pick your dynamic timezone.
Click Create. An isolated ingestion pipeline and API Key are allocated instantly.
Project Settings & Status Lifecycle
Every project supports dynamic lifecycle state transitions to manage event ingestion without code deploys.
Normal state. Ingestion engine actively buffers telemetry beacons and computes rolling DAU.
Ingestion pauses gracefully. Beacons are acknowledged without incrementing metrics.
Project becomes read-only. Historical analytics remain permanently accessible for audit.
Finding & Rotating API Keys
Authenticate telemetry payloads from the pulsemetrics-sdk with your Project API Key.
- Go to Dashboard → Projects and click your target project.
- Click Settings in the project navigation header.
- Under Project API key, view your secret key prefixed with
DAU-. - Click Copy key to copy it to your clipboard.
NEXT_PUBLIC_DAU_KEY or DAU_API_KEY. Never commit production keys to public git repositories.Active Sessions & Device Kill Switch
Navigate to Dashboard → Devices to inspect all browsers and computers currently authorized to access your organization.
- Device Fingerprints: Inspect client platform (macOS, Windows, Linux) and last active timestamp.
- Individual Session Revoke: Immediately terminate access on a suspicious workstation.
- Global Kill Switch: Single-click revoke terminating all remote sessions worldwide.
JavaScript & Node.js SDK
Install pulsemetrics-sdk for automated session and daily user telemetry.
// 1. Initialize tracker instance with your Project API Key
import Pulsemetrics from "pulsemetrics-sdk";
export const dau = new Pulsemetrics(
process.env.NEXT_PUBLIC_DAU_KEY || "YOUR_PROJECT_API_KEY"
);
// Method 1: init (Free & Starter plans)
await dau.init(user.id);
// Method 2: trackWithName (Pro and Enterprise plans)
await dau.trackWithName({
userId: user.id,
userName: user.name || "GUEST",
});5 Production Lifecycle Patterns
Recommended hooks and architectural locations to dispatch telemetry:
Call dau.init or dau.trackWithName immediately when the user logs in via email/password or OAuth.
import { dau } from "@/lib/dau";
async function handleLogin(credentials) {
const response = await api.post("/auth/login", credentials);
const user = response.data.user;
// Option 1: Free & Starter plans
await dau.init(user.id);
// Option 2: Pro and Enterprise plans
await dau.trackWithName({
userId: user.id,
userName: user.name || "GUEST",
});
}When logged-in users refresh your SPA or Next.js app, trigger dau.init or dau.trackWithName right after restoring user state.
import { useEffect } from "react";
import { dau } from "@/lib/dau";
export function useSessionRestore() {
useEffect(() => {
async function fetchCurrentUser() {
try {
const response = await fetch("/api/me");
if (response.ok) {
const userData = await response.json();
// Option 1: Free & Starter plans
await dau.init(userData.id);
// Option 2: Pro and Enterprise plans
await dau.trackWithName({
userId: userData.id,
userName: userData.name || "GUEST",
});
}
} catch (error) {
console.error("Session restore error:", error);
}
}
fetchCurrentUser();
}, []);
}Trigger DAU tracking when an expired access token is refreshed in your Axios interceptor.
import axios from "axios";
import { dau } from "@/lib/dau";
axios.interceptors.response.use(
(response) => response,
async (error) => {
if (error.response?.status === 401) {
// 1. Refresh expired token
const newSession = await refreshAccessToken();
// 2. Track DAU upon successful re-authentication
if (newSession?.user?.id) {
// Option 1: Free & Starter plans
await dau.init(newSession.user.id);
// Option 2: Pro and Enterprise plans
await dau.trackWithName({
userId: newSession.user.id,
userName: newSession.user.name || "GUEST",
});
}
// 3. Retry original request
return axios(error.config);
}
return Promise.reject(error);
}
);Place dau.init or dau.trackWithName inside your global React AuthProvider so any authenticated user is tracked automatically.
import React, { createContext, useEffect, useState } from "react";
import { dau } from "@/lib/dau";
export const AuthContext = createContext(null);
export function AuthProvider({ children }) {
const [user, setUser] = useState(null);
useEffect(() => {
if (user?.id) {
// Option 1: Free & Starter plans
dau.init(user.id).catch(console.error);
// Option 2: Pro and Enterprise plans
dau.trackWithName({
userId: user.id,
userName: user.name || "GUEST",
}).catch(console.error);
}
}, [user?.id, user?.name]);
return (
<AuthContext.Provider value={{ user, setUser }}>
{children}
</AuthContext.Provider>
);
}For public websites, documentation, and blogs without authentication. Generates a persistent UUID stored in localStorage.
import { useEffect } from "react";
import { dau } from "@/lib/dau";
export function useAnonymousTracker() {
useEffect(() => {
// 1. Check or generate persistent anonymous ID
let anonymousId = localStorage.getItem("dau_anon_id");
if (!anonymousId) {
anonymousId = crypto.randomUUID();
localStorage.setItem("dau_anon_id", anonymousId);
}
// 2. Track DAU with anonymous UUID
dau.init(anonymousId).catch(console.error);
}, []);
}SDK API Reference
Creates a new tracker instance. apiKey is the Project API Key obtained from your dashboard Project Settings.
Dispatches an asynchronous telemetry beacon associating the user identifier with the rolling 24-hour daily active user window.
Sends a telemetry record with both a unique user identifier and display name for user-level telemetry and identity retention.
HTTP REST API
Send telemetry beacons directly using cURL or any HTTP client from your backend service.
Content-Type: application/jsonx-api-key: YOUR_PROJECT_API_KEY
{ "user": "USER_ID" }{ "userId": "USER_ID", "userName": "John Doe" }Use /track for user ID telemetry, or /track-with-name on Pro and Enterprise tiers to include user names.
curl -X POST "https://api.pulsemetrics.in/api/v1/dau/track" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_PROJECT_API_KEY" \
-d '{"user": "USER_ID"}'5-Minute Automated Data Refresh
Telemetry metrics refresh on an automated 5-minute interval across all analytics views. When events are tracked from your application, the latest active user numbers are updated and displayed every 5 minutes.
If you keep the Analytics or Dashboard page open in your browser, your data automatically refreshes in the background every 5 minutes.
You do not need to manually reload or refresh your browser tab. Updated telemetry data appears automatically as each 5-minute interval completes.