Install Tracking Script

Add the Money Fast attribution script to your website.

The Money Fast tracking script is a lightweight (~1KB gzipped) JavaScript snippet that collects visitor attribution data (UTM parameters, referrer, device info) and stores it in a cookie. This data is later passed as checkout metadata for revenue attribution.

The tracking script is optional. Without it, Money Fast still tracks all orders and subscriptions via Stripe webhooks — you just won't get attribution data (traffic source, device, landing page, etc.).

HTML / Static Sites

Add this script tag to your website's <head> section:

<script defer data-website-id="YOUR_SITE_ID" src="https://moneyfa.st/js/script.min.js"></script>

Replace YOUR_SITE_ID with your actual Site ID, which you can find on the Settings page of your website in the Money Fast dashboard.

That's it. The script loads asynchronously and won't affect your page load performance.

Next.js / React (npm package)

If you're using Next.js or React, you can install the tracking script via the analytics-script npm package:

npm i analytics-script

Then add the component to your root layout:

// app/layout.tsx
import { MoneyFast } from 'analytics-script';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <head>
        <MoneyFast websiteId="YOUR_SITE_ID" />
      </head>
      <body>{children}</body>
    </html>
  );
}

The package also provides helper functions for custom event tracking and attribution data:

import { trackMoneyFastEvent, getMoneyFastMeta } from 'analytics-script';

// Track a custom event
trackMoneyFastEvent('signup_click');

// Get attribution data for Stripe Checkout metadata
const meta = getMoneyFastMeta();

See the full documentation for all available props and helpers.

Next.js (App Router)

Alternatively, use the Next.js Script component directly in your root layout:

// app/layout.tsx
import Script from 'next/script';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <head>
        <Script
          src="https://moneyfa.st/js/script.min.js"
          data-website-id="YOUR_SITE_ID"
          strategy="afterInteractive"
        />
      </head>
      <body>{children}</body>
    </html>
  );
}

Next.js (Pages Router)

Add the script in _app.tsx or _document.tsx:

// pages/_app.tsx
import Script from 'next/script';

export default function MyApp({ Component, pageProps }) {
  return (
    <>
      <Script
        src="https://moneyfa.st/js/script.min.js"
        data-website-id="YOUR_SITE_ID"
        strategy="afterInteractive"
      />
      <Component {...pageProps} />
    </>
  );
}

React (Vite / CRA)

Add the script tag to your index.html:

<!-- index.html -->
<head>
  <script defer data-website-id="YOUR_SITE_ID" src="https://moneyfa.st/js/script.min.js"></script>
</head>

Vue.js / Nuxt

For Nuxt 3, add to nuxt.config.ts:

// nuxt.config.ts
export default defineNuxtConfig({
  app: {
    head: {
      script: [
        { src: 'https://moneyfa.st/js/script.min.js', defer: true, 'data-website-id': 'YOUR_SITE_ID' },
      ],
    },
  },
});

For plain Vue, add the script tag to your index.html.

Astro

Add to your base layout:

---
// src/layouts/Layout.astro
---
<html>
  <head>
    <script defer data-website-id="YOUR_SITE_ID" src="https://moneyfa.st/js/script.min.js"></script>
  </head>
  <body>
    <slot />
  </body>
</html>

WordPress

Add the script via your theme's functions.php:

// functions.php
function add_moneyfast_script() {
    wp_enqueue_script(
        'moneyfast',
        'https://moneyfa.st/js/script.min.js',
        array(),
        null,
        false
    );
}
add_action('wp_enqueue_scripts', 'add_moneyfast_script');

// Add data-website-id attribute
function add_moneyfast_site_id($tag, $handle) {
    if ('moneyfast' === $handle) {
        $tag = str_replace(' src=', ' data-website-id="YOUR_SITE_ID" src=', $tag);
    }
    return $tag;
}
add_filter('script_loader_tag', 'add_moneyfast_site_id', 10, 2);

Or use a plugin like Insert Headers and Footers to add the <script> tag to your site's <head>.

Webflow

  1. Go to Project Settings → Custom Code.
  2. Paste the script tag in the Head Code section:
<script defer data-website-id="YOUR_SITE_ID" src="https://moneyfa.st/js/script.min.js"></script>
  1. Save and publish.

Google Tag Manager

  1. In GTM, create a new Custom HTML tag.
  2. Paste the following:
<script defer data-website-id="YOUR_SITE_ID" src="https://moneyfa.st/js/script.min.js"></script>
  1. Set the trigger to All Pages.
  2. Publish the container.

Verify Installation

After installing the script, verify it's working:

  1. Visit your website and open the browser Developer Console (F12).
  2. Type MoneyFast.get() and press Enter.
  3. You should see an object with your attribution data (device, browser, OS, landing page, etc.).

You can also use the Attribution Script check button on your website's Settings page in the Money Fast dashboard. The check verifies both that the script is present and that the data-website-id matches the current website — if you accidentally installed a script with a different website's ID, it will flag the mismatch.

Debug Mode

To see detailed logs of what the script collects, add the data-debug attribute:

<script defer data-website-id="YOUR_SITE_ID" data-debug="true" src="https://moneyfa.st/js/script.min.js"></script>

Open the browser console to see [MoneyFast] log messages. Remember to remove data-debug before going to production.

Custom Events

The tracking script also supports custom event tracking. After installing the script with data-website-id, you can track user actions:

// Track a custom event
MoneyFast.track('signup_click')
MoneyFast.track('pricing_view')
MoneyFast.track('add_to_cart')

Event names must be alphanumeric with underscores, hyphens, or dots (max 100 characters). Custom events are visible in the Events page of your dashboard under the "Custom" filter.

Next Steps

After installing the script, you need to pass the attribution data to your checkout flow so that Money Fast can link each order to its traffic source.