Guides / SaaS
A signup notification should tell you: who signed up, where they came from, and what plan they're on — all at a glance.
await logit.now("signups", {
event: "New signup",
description: `${user.email} joined on ${user.plan}`,
icon: "👤",
notify: true,
tags: {
plan: user.plan, // "free" | "pro" | "team"
source: user.signupSource, // "landing-page" | "referral" | "product-hunt"
country: user.country, // "US" | "UK" etc.
},
metadata: {
userId: user.id,
email: user.email,
createdAt: new Date().toISOString(),
},
});
Store UTM params in a cookie at first visit, then read them on signup:
const source = cookies().get("utm_source")?.value ?? "direct";
const campaign = cookies().get("utm_campaign")?.value ?? "none";
await logit.now("signups", {
event: "New signup",
description: `${user.email} from ${source}`,
icon: "👤",
notify: true,
tags: { plan: user.plan, source, campaign },
metadata: { userId: user.id, email: user.email, source, campaign },
});
await logit.now("signups", {
event: "New signup via referral",
description: `${user.email} referred by ${referrer.email}`,
icon: "🔗",
notify: true,
tags: { source: "referral", referrerId: referrer.id },
metadata: { userId: user.id, email: user.email, referrerId: referrer.id },
});
Keep your source tag values consistent ("product-hunt" not "ProductHunt"). You'll filter by them later.
Try LogIt free
7-day trial. No credit card required.