ingestlayer/recipes

Track trial conversions

Know the moment a trial turns into a paying plan — the clearest signal your activation is working — and route it to the people who made it happen.

the event

Emit trial.converted once; route it anywhere below.

  • customer_idstring
  • planstring
  • trial_daysnumberlength of trial
  • mrrnumberminor units
emit trial.converted
import { ingest } from "@ingestlayer/sdk";

await ingest("trial.converted", {
  customer_id: sub.customer,
  plan:        sub.plan.nickname,
  trial_days:  daysBetween(sub.trial_start, sub.trial_end),
  mrr:         sub.plan.amount,
}, {
  idempotencyKey: sub.id,
});

send it to