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
- Deploy to a test environment.
- Perform the action once with a known test user.
- Find the event in Events.
- Confirm its name, identity, timestamp, and required properties.
- 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.