@databuddy/sdk weekly downloads statistics
By databuddy · npm · MCP servers
Databuddy SDK: hosted, cookieless product analytics with custom events, feature flags, and error tracking for React, Next.js, Vue, and Node.js.
@databuddy/sdk has 32,630 recorded weekly downloads on npm, an increase of 10.8% over the past 30 days, ranking #904 of 3,247 tracked listings.
About @databuddy/sdk
Databuddy SDK
Hosted product analytics for your web app: pageviews, custom events, funnels, feature flags, and errors, without cookies.
Features
- Automatic page and screen view tracking
- Web Vitals and JavaScript error tracking
- Custom events from the browser and from Node.js
- Drop-in React/Next.js and Vue components
- Client and server-side feature flags
- MCP server analytics covering tool calls, clients, latency, and errors
- Server-side detection of AI agents that read your pages
- No cookies, with sampling, batching, and path masking options
- Type-safe configuration with autocompletion
Quickstart
bun add @databuddy/sdk
# or
npm install @databuddy/sdk
Add the provider to your root layout (Next.js/React):
import { DatabuddyProvider } from '@databuddy/sdk/react';
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
<DatabuddyProvider
clientId={process.env.NEXT_PUBLIC_DATABUDDY_CLIENT_ID!}
autocapture={{ webVitals: true, errors: true }}
/>
{children}
</body>
</html>
);
}
Without children the provider only loads tracking. To also link events to the signed-in user and serve feature flags, wrap your app and pass the user, or null when signed out:
<DatabuddyProvider
clientId={process.env.NEXT_PUBLIC_DATABUDDY_CLIENT_ID!}
user={user ? { id: user.id, traits: { email: user.email, plan: user.plan } } : null}
userPending={isPending}
>
{children}
</DatabuddyProvider>
The provider calls identify() and reset() for you as user changes. Omit user to manage identity yourself.
Track custom events from anywhere in the browser:
import { track, trackError } from '@databuddy/sdk';
track('signup_completed', { plan: 'pro' });
trackError(error, { page: '/checkout' });
Declare your events to type-check track():
import '@databuddy/sdk';
declare module '@databuddy/sdk' {
interface Events {
signup_completed: { plan: 'free' | 'pro' };
}
}
Without React, call init() once on the client:
import { init } from '@databuddy/sdk';
init({ clientId: 'your-client-id', autocapture: { errors: true } });
Upgrading from an earlier 3.x API? Existing code keeps working; see the upgrade guide.
Accounts
Put each visitor in the company or workspace they're working in. Their events and flags are then grouped by that account. With React, pass it to the provider:
<DatabuddyProvider
clientId={process.env.NEXT_PUBLIC_DATABUDDY_CLIENT_ID!}
user={user}
groups={{ workspace: workspace?.id }}
>
{children}
</DatabuddyProvider>
Leave a type undefined while its account loads, so the remembered one is kept. Pass null once the visitor has left it.
Without the provider, call group() once you know the account:
import { getGroups, group } from '@databuddy/sdk';
group('workspace', workspace.id, { name: workspace.name });
group('workspace', null); // when they leave it or sign out
getGroups(); // { workspace: 'ws_123' }
Later events carry group_workspace, and the SDK remembers the account across visits. Billing, date and usage traits are accepted only from your server: send them with the Node SDK's client.group(). See the accounts guide.
Feature flags
Declare each flag once with its default, then read it inside DatabuddyProvider. useFlag returns the typed value and never undefined: the default is served until flags load, when the flag is missing, and on errors.
import { defineFlag } from '@databuddy/sdk';
import { useFlag, useFlagDetails } from '@databuddy/sdk/react';
export const newCheckout = defineFlag('new-checkout', { default: false });
function Checkout() {
const enabled = useFlag(newCheckout);
return enabled ? <NewCheckout /> : <OldCheckout />;
}
useFlagDetails(flag) adds loading, status, variant and reason, and useFlagsStatus() returns { isReady, error, refresh }. Flags load the first time a component reads one, or render with real values from the server when you pass flags={{ bootstrap: await evaluateFlags({ clientId, user }) }} (from @databuddy/sdk/node). Configure them with the provider's flags prop: flags={{ environment: 'production', persist: false }}.
Node.js events
import { Databuddy } from "@databuddy/sdk/node";
const client = new Databuddy({
apiKey: process.env.DATABUDDY_API_KEY!,
websiteId: process.env.DATABUDDY_WEBSITE_ID,
source: "server"
});
await client.track({
name: "job_completed",
eventId: "job-123",
properties: { queue: "emails" }
});
const result = await client.flush();
if (!result.success) {
console.error("Failed to flush analytics:", result.error);
}
MCP servers
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { trackMcp } from "@databuddy/sdk/mcp";
const server = trackMcp(new McpServer({ name: "my-server", version: "1.0.0" }));
```…
Description from the npm listing.
- analytics
- product-analytics
- web-analytics
- cookieless
- feature-flags
- error-tracking
- tracking
- databuddy
- sdk
- react
- nextjs
- vue
- node
- mcp
- source-maps
- vite-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm MCP servers plugins
All 20 @databuddy/sdk alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@databuddy/sdk. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.