Skip to main content
Use a custom event when the SDK cannot infer an important action automatically: a signup, lead submission, trial start, upgrade, or feature milestone.

Design the event

Give each action a short, stable name. Use lowercase names such as signup_completed or demo_booked. Put variation in properties instead of creating dozens of event names.
datalyr.track("signup_completed", {
  plan: "pro",
  billing_period: "annual"
})
For a purchase-like event, send numeric value and an ISO currency when supported by the SDK and your conversion rule.
datalyr.track("order_completed", {
  order_id: "ord_4821",
  value: 79,
  currency: "USD"
})
Use the exact method and options from the relevant SDK Reference. Server and mobile SDKs can also support original timestamps or idempotency values for delayed and retryable events.

Verify it

  1. Deploy to a test environment.
  2. Perform the action once with a known test user.
  3. Find the event in Events.
  4. Confirm its name, identity, timestamp, and required properties.
  5. If it drives a destination conversion, create the rule only after the source event is correct.

Keep the schema clean

  • Never put IDs or dynamic values in the event name.
  • Keep property types consistent; do not alternate between 79 and "79".
  • Use a stable order or transaction ID to prevent accidental duplicate business events.
  • Document required properties in your application repository.
Do not include passwords, tokens, complete payment details, or regulated personal data in custom properties.