Documentation

React installation guide

Use the local browser package described in npm installation. Mount this component once in your app's root, after any required consent:

import { useEffect } from 'react';
import { init } from 'analyticfast';
export function Analytics() {
  useEffect(() => {
    init({ siteId: 'YOUR_SITE_ID', host: 'https://YOUR_ANALYTICS_HOST' });
  }, []);
  return null;
}

Repeated init is safe under StrictMode. The tracker already handles initial and SPA pageviews; keep route-change effects out of the integration. Keep this component mounted across navigation. For a static app, a single deferred script in index.html is also sufficient; use one method.

Official reference, checked 2026-10-26: React useEffect.

Questions, answered.

How do I use react installation with AnalyticFast?

Follow the React installation instructions on this page using your own website’s Site ID and configuration. Verify a real event before relying on the reports.

Where can I get setup help?

Contact support@analyticfast.com with the website domain and a redacted description. Do not send API tokens, signing secrets or personal customer data.