Getting started

This guide takes you from a new Databuddy account to your first tracked pageview. For API schemas, machine-readable references, and integration entry points, use the developer resources hub.

Create your account

  1. Go to app.databuddy.cc
  2. Sign up for a free account
  3. Create a website in the dashboard
  4. The dashboard shows your install snippet with your Client ID

Install the SDK

Choose the install method for your app. For Vue, follow the Vue SDK guide.

Install the official Databuddy SDK:

bash
# Using bun (recommended)
bun add @databuddy/sdk

# Using npm
npm install @databuddy/sdk

# Using yarn
yarn add @databuddy/sdk

Add tracking

Add the <Databuddy /> component once in your root layout:

app/layout.tsxtsx
import { Databuddy } from "@databuddy/sdk/react";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <head />
      <body>
        <Databuddy
          clientId={process.env.NEXT_PUBLIC_DATABUDDY_CLIENT_ID!}
          trackWebVitals
          trackErrors
        />
        {children}
      </body>
    </html>
  );
}

Environment variables:

.env.localbash
NEXT_PUBLIC_DATABUDDY_CLIENT_ID=your-client-id

trackWebVitals and trackErrors are off by default; trackErrors requires the Hobby plan or higher.

Verify installation

Check that page tracking works:

  1. Visit your website in a new browser tab
  2. Open your Databuddy dashboard at app.databuddy.cc
  3. Check real-time data: you should see yourself as an active visitor
  4. Navigate between pages: Databuddy records route changes automatically

If you see real-time data in your dashboard, congratulations! Databuddy is now tracking your website analytics.

Track your first custom event

components/signup-button.tsxtsx
"use client";

import { track } from "@databuddy/sdk";

export function SignupButton() {
return (
  <button
    onClick={() =>
      track("signup_clicked", {
        location: "header",
        plan: "free",
      })
    }
    type="button"
  >
    Sign up
  </button>
);
}

Keep custom event names stable and use properties for details like location, plan, status, or source.

For the decisions behind an integration, read the React and Next.js SDK comparison. A WordPress site has a separate installation and verification walkthrough; once tracking works, follow the UTM campaign measurement guide to test attribution.

Troubleshooting

Not seeing data in your dashboard?

  1. Check your Client ID: make sure it matches this website
  2. Test manually: try db.track('test', {}) in your browser console
  3. Check the Network tab: look for requests to basket.databuddy.cc
  4. Review environment: make sure tracking isn't disabled in production

Need help? Join our Discord community or contact support.

How is this guide?