Guides / Payments

How to Track Trial-to-Paid Conversions

4 min read·Payments

Track the Full Lifecycle

A trial has three moments worth tracking: when it starts, when it expires (or is about to), and when it converts to paid. Logging all three gives you the full picture.

Trial started

Call this when the user activates a trial:

ts
const trialStart = await logit.now("trials", {
  event: "Trial started",
  description: `${user.email} started a 7-day trial`,
  icon: "🎁",
  notify: true,
  tags: { plan: "pro" },
  metadata: {
    userId: user.id,
    email: user.email,
    trialEndsAt: trialEndDate.toISOString(),
  },
});

Save trialStart.id as the trackingId for the timeline.

Trial converted

When the user upgrades (Stripe webhook customer.subscription.created):

ts
await logit.now("trials", {
  event: "Trial converted to paid 🎉",
  description: `${user.email} upgraded to Pro`,
  icon: "🎉",
  notify: true,
  trackingId: user.logitTrialTrackingId, // links to the trial start event
  tags: { plan: "pro", converted: "true" },
  metadata: { userId: user.id, email: user.email },
});

Trial expired without converting

Run this from a cron job when trials expire:

ts
for (const user of expiredTrialUsers) {
  await logit.now("trials", {
    event: "Trial expired — not converted",
    description: user.email,
    icon: "⏰",
    notify: false,
    trackingId: user.logitTrialTrackingId,
    tags: { plan: "free", converted: "false" },
    metadata: { userId: user.id, email: user.email },
  });
}

What You Get

In your LogIt inbox, each trial appears as a timeline: Started → (Converted or Expired). Filter by converted: "true" to see conversion rate at a glance.

Try LogIt free

7-day trial. No credit card required.

Start free