Documentation

Complete integration guide for Dripmetric Enterprise — track onboarding steps, automate drip emails, and recover stuck users.

Quick Start

Use the public HTTP API from any backend. Works with any language capable of making HTTP requests. The Node.js package is a lightweight wrapper around these endpoints.

npm install dripmetric
import { Dripmetric } from "dripmetric";

const onboard = new Dripmetric("obf_live_your_api_key");

Never expose your API key client-side. Always call identify() and track() from your server — API routes, server actions, or backend handlers only.

SDK Methods

onboard.identify()

Call this when a user signs up or logs in. It creates the user in your Dripmetric dashboard and immediately sends them your configured Step 1 welcome email.

await onboard.identify({
  userId: "user_123",   // your internal user ID
  email: "alice@example.com"
});
  • Safe to call on every login — re-identifying an existing user does not re-send the welcome email.
  • If the user already exists, their record is updated with a new lastSeenAt timestamp.

onboard.track()
Schema-less

Call this whenever a user completes an onboarding step. Dripmetric uses Schema-less Ingestion — this means you do NOT need to pre-create events in your dashboard before tracking them. Your codebase dictates what gets tracked.

await onboard.track({
  userId: "user_123",
  stepId: "created_first_project"  // Use any custom string you want!
});
  • Just make up a string (like connected_repo or invited_team) and send it. Dripmetric will record it.
  • Once your code sends the event, it will automatically appear in your Automation Settings dropdowns for you to trigger emails from.
  • Call identify() before track() — tracking an unknown user returns a 404.
  • Tracking the same step twice is safe — it is stored only once (idempotent).

How Drip Emails Work

Dripmetric runs an automated cron job that checks all your users for onboarding progress. Emails are sent when a user is stuck — not on every step completion.

User signs up
  → identify() called
  → Welcome email sent immediately (Step 1 email template)

Cron runs every 15 minutes:
  → Step 1 not completed after 1 hour  → sends Step 1 nudge email
  → Step 2 not completed after 24 hours → sends Step 2 nudge email
  → Step 3 not completed after 24 hours → sends Step 3 nudge email

User completes a step via track()
  → Step marked complete
  → That step's nudge email will no longer be sent
  • Each nudge email is sent at most once per user per step — no repeated emails.
  • Users who unsubscribe are automatically excluded from all future emails.
  • You can trigger the cron manually from your dashboard using the Run Now button.

Setting Up Your Sending Domain

By default Dripmetric uses a shared sending domain which only works for your own inbox during testing. For production, connect your own Resend account so emails arrive from your domain.

Required for production. Without a connected sending account, drip emails will not deliver to your users' inboxes reliably.

Setup steps

1. Create a free account at resend.com

2. Go to Domains → Add Domain → enter yourdomain.com
   Resend will give you DNS records to add (TXT + MX).
   Add them in Cloudflare, Namecheap, or wherever your domain lives.
   Verification takes ~10 minutes.

3. Go to API Keys → Create API Key → Full Access
   Copy the key (starts with re_live_...)

4. In Dripmetric → Automation Settings → Email Sending:
   - Paste your Resend API key
   - Enter your from address (e.g. hello@yourdomain.com)
   - Click Save Email Settings

Your users will now receive emails from your domain.

From address format

Use a recognizable address your users will trust — hello@yourapp.com, noreply@yourapp.com, or team@yourapp.com. The domain must be verified in your Resend account or emails will be rejected.

Analytics & Funnel Tracking

Your dashboard shows how many users have completed each step, where they are dropping off, and your overall activation rate. This is calculated in real time from each user's completedSteps array against your current step configuration.

Renaming steps resets your funnel metrics

Your analytics are calculated by matching each user's recorded completedSteps values against the Event Name (Code) fields in your current Automation Workflow settings.

If you rename a step from connect_repo to connected_repository, all users who previously completed connect_repo will no longer be counted as having completed that step. Your completion rate will appear to drop to zero for that step.

Rule: Treat Event Name codes like database column names — set them once and do not change them. If you need to rename, you must also backfill your end_users table in Supabase to update the old step strings.

Manual API Reference

If you prefer direct HTTP calls over the SDK, use these endpoints.

POST /api/public/identify

POST /api/public/identify
Headers: {
  "x-api-key": "obf_live_...",
  "Content-Type": "application/json"
}
Body: {
  "userId": "user_123",
  "email": "alice@example.com"
}

POST /api/public/track

POST /api/public/track
Headers: {
  "x-api-key": "obf_live_...",
  "Content-Type": "application/json"
}
Body: {
  "userId": "user_123",
  "stepId": "created_project"
}

Rate Limits & Plan Tiers

LimitFreeStarterGrowth / Pro
Tracked end users50500Unlimited
Emails per day20100Unlimited
Emails per month3002,000Unlimited
Drip steps33Unlimited
API rate limitRate-limited by IP across all tiers

Integration checklist

  • Call identify() in your auth callback (after signup and login)
  • Call track() server-side immediately after a key action completes
  • Set your Step 1 Event Name in Automation Settings before going live
  • Enable Auto-Pilot in Automation Settings to activate the cron
  • Never rename Event Name codes after you have real user data

AI Integration Prompt

Building your app with Cursor, GitHub Copilot, or another AI coding assistant? Before copying the prompt below, replace the bracketed placeholders like [YOUR_API_KEY] and [STEP_NAME] with your actual details. Then paste it into your AI to have it integrate Dripmetric instantly.

You are an expert full-stack developer. I need you to integrate the 'dripmetric' Node SDK into our backend to track user onboarding.

1. Install the SDK: `npm install dripmetric`

2. Initialize it in our backend utility or service layer using the API key from our environment variables. Please add `DRIPMETRIC_API_KEY=[YOUR_API_KEY]` to our .env files.
   ```ts
   import { Dripmetric } from "dripmetric";
   export const onboard = new Dripmetric(process.env.DRIPMETRIC_API_KEY!);
   ```

3. Locate our user SIGNUP and LOGIN logic. At the end of a successful authentication flow, call `await onboard.identify({ userId: user.id, email: user.email })` server-side. Do NOT call this from the client-side browser.

4. Locate our core onboarding step completion logic. Specifically, find where the user does the following action: "[DESCRIBE_THE_ACTION_THEY_TAKE]". Add a tracking call server-side right after that action succeeds: `await onboard.track({ userId: user.id, stepId: "[STEP_NAME]" })`.

Please find those authentication and onboarding execution points in our codebase now, and add these snippets. Ensure the API key is never exposed to the frontend.