Install CloudFast tracker
How to install the lightweight CloudFast analytics tracker on your website or web application?
You only need your Site ID and a modern browser or web framework.
1. Install tracker as a Node package:
npm i -D @cloudfast/tracker
2. Or add the script tag directly to your HTML
<head>:
index.html
<script
defer
data-site="YOUR_SITE_ID"
src="https://cloudfast.com/t.js">
</script>
#
Framework install tutorials
Quick integration guides for popular frontend frameworks and CMS platforms.
Next.js (App Router)
app/layout.tsxAdd Next.js Script component to your root layout:
app/layout.tsx
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html>
<head>
<Script
strategy="afterInteractive"
data-site="YOUR_SITE_ID"
src="https://cloudfast.com/t.js"
/>
</head>
<body>{children}</body>
</html>
);
}
Custom Goals & Events
SDK API
Trigger custom goal completions or revenue events via cloudfast.track and identify users via cloudfast.identify:
checkout.js
// Trigger custom goal
window.cloudfast.track('signup', { plan: 'pro', value: 9 });
// Identify customer
window.cloudfast.identify({ email: 'founder@example.com', name: 'Alex' });