Install in 60 seconds

One line of code. Works on every platform. Remove anytime.

<script src="https://api.spendraven.com/r.js" data-domain="yoursite.com"></script>

Choose your platform

Add to your theme's header.php, or use a plugin like "Insert Headers and Footers":

    Go to Plugins → Add New → search "Insert Headers and Footers"

    Install and activate

    Go to Settings → Insert Headers and Footers

    Paste the snippet in the "Scripts in Header" box

    <script src="https://api.spendraven.com/r.js" data-domain="yoursite.com"></script>

    Save

Add the snippet inside your base layout's <head>:

src/layouts/Layout.astro
---
// src/layouts/Layout.astro
---
<head>
  <!-- SpendRaven Analytics -->
  <script src="https://api.spendraven.com/r.js" data-domain="yoursite.com"></script>
</head>

Use Next.js's built-in Script component with afterInteractive strategy:

app/layout.tsx
// app/layout.tsx (App Router)
import Script from 'next/script'

export default function RootLayout({ children }) {
  return (
    <html>
      <head>
        <Script
          src="https://api.spendraven.com/r.js"
          data-domain="yoursite.com"
          strategy="afterInteractive"
        />
      </head>
      <body>{children}</body>
    </html>
  )
}

    Go to Online Store → Themes → Edit code

    Open theme.liquid (or head section)

    Paste before </head>:

    <script src="https://api.spendraven.com/r.js" data-domain="yoursite.com"></script>

    Save

    Go to Project Settings → Custom Code

    In "Head Code", paste:

    <script src="https://api.spendraven.com/r.js" data-domain="yoursite.com"></script>

    Publish

    Go to Settings → Advanced → Code Injection

    In "Header", paste:

    <script src="https://api.spendraven.com/r.js" data-domain="yoursite.com"></script>

    Save

Paste the snippet inside <head> on every page you want to track:

index.html
<!DOCTYPE html>
<html>
<head>
  <script src="https://api.spendraven.com/r.js" data-domain="yoursite.com"></script>
</head>
<body>
  ...
</body>
</html>

Verify your installation

After installing, visit your site and check the SpendRaven dashboard. Data appears within 60 seconds.

Track conversions

Call spendraven.converted() when a goal completes: signup, purchase, lead. The value is optional but helps measure ROI against ad spend.

<!-- Fire when a user converts -->
<script>
  spendraven.converted('signup', { value: 49.00 });
</script>

Track custom events

Use spendraven.track() for any meaningful user action: button clicks, feature views, funnel steps.

<script>
  spendraven.track('pricing_viewed', { plan: 'pro' });
</script>

Common questions

Does this slow down my site?
No. 4KB async script. Loads after your page, never blocks rendering.
Do I need cookie consent?
No. SpendRaven doesn't use cookies for tracking. No PII is collected.
What if I want to remove it?
Delete the one line. All historical data stays in your dashboard.
Does it track ad blockers?
No. If the script is blocked, that visit simply isn't counted.