Docs

Signup Alerts

Get notified the moment a new user creates an account. Know who signed up, from where, and on which plan — without checking your database.


Where to add it

Call logit.now() right after you persist the new user — in your signup handler, OAuth callback, or Clerk/Auth webhook.

Basic signup event

ts
await logit.now("signups", {
  event: "New user signed up",
  description: `${user.email} just created an account`,
  icon: "👤",
  notify: true,
  tags: {
    plan: user.plan ?? "free",
    source: signupSource ?? "direct",
  },
  metadata: {
    userId: user.id,
    email: user.email,
    name: user.name,
    country: geo?.country,
  },
});

With referral or UTM data

ts
await logit.now("signups", {
  event: "New user signed up",
  description: `${user.email} joined via ${utm.source ?? "organic"}`,
  icon: "👤",
  notify: true,
  tags: {
    plan: user.plan,
    source: utm.source ?? "organic",
    campaign: utm.campaign ?? "none",
  },
  metadata: {
    userId: user.id,
    email: user.email,
    referrer: utm.referrer,
    landingPage: utm.landingPage,
  },
});

OAuth / Clerk webhooks

ts
if (event.type === "user.created") {
  const { id, email_addresses, first_name, last_name } = event.data;
  await logit.now("signups", {
    event: "New user signed up",
    description: `${email_addresses[0]?.email_address} joined via Clerk`,
    icon: "👤",
    notify: true,
    tags: { provider: "clerk" },
    metadata: {
      userId: id,
      email: email_addresses[0]?.email_address,
      name: [first_name, last_name].filter(Boolean).join(" "),
    },
  });
}

Tips

  • Set notify: true on signups you want pushed immediately.
  • Use source tags consistently — "landing-page", "product-hunt", "referral".
  • Put emails and IDs in metadata, not tags.