Send events
import UserFlux from '@userflux/browser-js'
await UserFlux.track({
event: 'purchase',
properties: {
"amount": 99.50,
"currency": "AUD",
"orderId": "order-id",
"productId": "product-id",
"fees": {
"cardSurcharge": 0.99
}
},
userId: '<USER_ID>' // replace <USER_ID> with your user's unique identifier
})import { useUserFlux } from "@userflux/browser-js-react"
const userFlux = useUserFlux()
await userFlux.track({
event: 'purchase',
properties: {
"amount": 99.50,
"currency": "AUD",
"orderId": "order-id",
"productId": "product-id",
"fees": {
"cardSurcharge": 0.99
}
},
userId: '<USER_ID>' // replace <USER_ID> with your user's unique identifier
})Best Practices
1. Start with Auto Capture on your frontend
2. Instrument Custom Events
3. Include properties on an event
4. Follow Consistent Naming Conventions
5. Sending events from the Client vs. Backend
Backend‑side
Client‑side
6. Understanding Ingestion Time
Last updated