Documentation
Complete integration guide for Dripmetric Enterprise — track onboarding steps, automate drip emails, and recover stuck users.
Quick Start
Install the SDK and initialize it with your API key from the dashboard.
npm install dripmetricimport { 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
lastSeenAttimestamp.
onboard.track()
Call this whenever a user completes an onboarding step. The stepId must exactly match the Event Name (Code) you configured in your Automation Workflow settings.
await onboard.track({
userId: "user_123",
stepId: "created_project" // must match dashboard Event Name exactly
});- Call
identify()beforetrack()— tracking an unknown user returns a 404. - Tracking the same step twice is safe — it is stored only once (idempotent).
stepIdis case-sensitive."Created_Project"and"created_project"are treated as different steps.
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.
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/v1/identify
POST /api/v1/identify
Headers: {
"x-api-key": "obf_live_...",
"Content-Type": "application/json"
}
Body: {
"userId": "user_123",
"email": "alice@example.com"
}POST /api/v1/track
POST /api/v1/track
Headers: {
"x-api-key": "obf_live_...",
"Content-Type": "application/json"
}
Body: {
"userId": "user_123",
"stepId": "created_project"
}Rate Limits & Plan Tiers
| Limit | Free | Basic | Advanced |
|---|---|---|---|
| Tracked end users | 50 | 500 | Unlimited |
| Emails per day | 20 | 100 | Unlimited |
| Emails per month | 300 | 2,000 | Unlimited |
| Drip steps | 3 | 3 | Unlimited |
| API rate limit | Rate-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