FastStatsFastStats Docs

Web SDK

Track events and web vitals in your website

Web Analytics is not yet publicly available

Use the FastStats Web SDK to track page activity, custom events, and performance data in your web app.

Installation

npm i faststats

Initialize

import { initFastStats } from "@faststats/web";

initFastStats({
	projectId: "your-project-id",
	webVitals: true,
	cookieless: true,
});

Script Tag Alternative

<script
	defer
	data-project-id="your-project-id"
	data-web-vitals="true"
	data-cookieless="true"
	src="https://cdn.faststats.dev/tracker.js"
></script>

Core Metrics

  • LCP for loading performance
  • CLS for visual stability
  • INP for responsiveness
  • FCP for first content paint
  • TTFB for server response speed

Notes

  • Enable Web Vitals in project settings to receive vitals data.
  • cookieless mode is suitable for privacy-focused deployments.
  • Start with default sampling and tune only if traffic is very high.

On this page