Cryptique.track()
Track custom events to capture specific user actions in your dApp. This is how you instrument Web3-specific interactions like swaps, stakes, mints, and more.Parameters
string
required
The name of the event. Use descriptive, action-oriented names.
- Maximum length: 255 characters
- Case-sensitive
- Use consistent naming conventions (e.g.,
Title Caseorsnake_case)
object
Optional object containing event properties. Add context to your events with relevant data.See Implementation Guide for property constraints.
object
Optional configuration for this specific event.
Returns
void - Events are sent asynchronously.
Basic Examples
Simple Event
Event with Properties
Web3 Event Examples
- DeFi
- NFT
- Gaming
- General
Event Naming Best Practices
Do ✅
Don’t ❌
Property Best Practices
Use Meaningful Properties
Avoid Reserved Properties
These property names are reserved and will be stripped from event data:Tracking Conversion Funnels
Track each step of your conversion funnel to identify drop-offs:Error Tracking
Track errors to identify friction points:TypeScript
Related Methods
Identify Users
Link events to user identities
User Properties
Set persistent user attributes