Getting Started

Quick Start

Add the ChurnFast tracking script to your app in under 5 minutes. The script captures page views and session durations to power churn predictions.

How it works

The ChurnFast tracking script is a lightweight, zero-dependency JavaScript snippet that you add to your application. It automatically tracks page views and session durations, and supports single-page app navigation out of the box.

Privacy-first

Customer emails are SHA-256 hashed client-side before being sent. No plaintext data leaves the browser.

SPA-ready

Automatically tracks navigation in single-page apps via History API interception. Works with React, Next.js, Vue, and more.

Lightweight

Under 2KB gzipped. Events are batched and sent via navigator.sendBeacon for zero performance impact.

What it tracks

  • Page views — every page visit is recorded, including client-side navigations in SPAs.
  • Session durations — how long each user spends in your app per session.
  • Customer identity — the user's email (required) links activity to your Stripe customers for churn scoring.

Setup in 3 steps

1

Get your Site ID

After creating your website in ChurnFast and connecting Stripe, you'll find your Site ID on the Integrations page. It's a unique UUID that identifies your website.

2

Add the tracking script

Add the following script tag to every page of your application, ideally in the <head> section. The data-email attribute is required to identify the logged-in customer:

<script src="https://yourapp.churnfa.st/e/app.js"
  data-site="YOUR_SITE_ID"
  data-email="user@example.com">
</script>
html

Note

The email is hashed client-side using SHA-256 before being sent. ChurnFast never receives the plaintext email address.
3

Verify installation

Navigate to your Integrations page in ChurnFast and click Verify Installation. ChurnFast will check your site for the tracking script and confirm it's working.

Platform guides

Choose your platform for detailed installation instructions: