Installation Guide
HTML / Static Sites
Add ChurnFast tracking to any HTML page, static site generator, or server-rendered application.
Installation
1
Add the script tag
Add the following snippet before the closing </head> tag on every page you want to track:
<script
src="https://yourapp.churnfa.st/e/app.js"
data-site="YOUR_SITE_ID"
data-email="user@example.com">
</script>Warning
The
data-email attribute is required. It links browsing activity to your Stripe customers. The email is SHA-256 hashed in the browser before being sent — ChurnFast never receives the plaintext email.2
Inject the email dynamically
Replace the static email with the logged-in user's email using your server-side templating:
<!-- PHP example -->
<script
src="https://yourapp.churnfa.st/e/app.js"
data-site="YOUR_SITE_ID"
data-email="<?= htmlspecialchars($user->email) ?>">
</script>3
Verify installation
Open your site in a browser, then go to ChurnFast's Integrations page and click Verify Installation.
What's tracked
Once installed, the script automatically tracks:
- Page views — every page the customer visits
- Session durations — how long each visit lasts
Identifying users after page load
If the user's email isn't available at page load (e.g., they log in after the page renders), you can identify them via JavaScript:
// Call after the user logs in
window._cf.identify('user@example.com');Next steps
- Script Configuration Reference — full details on attributes and behavior