Overview
The Formo SDK offers an easy-to-use event collection library that allows you to track custom events in your crypto app. Ensure high quality, structured data with Formo. Start tracking custom events with the Web SDK to get started. Custom events work with Wallet Intelligence and Funnels to give you a complete picture of each user’s journey.How to track custom events
While Formo autocaptures page views, wallet connects, and transactions, custom events let you track specific actions that matter to your app. This guide shows you how.When to use custom events
Track actions that aren’t captured automatically:| Action | Why track it |
|---|---|
| Button clicks | Measure CTA effectiveness |
| Form submissions | Track lead generation |
| Feature usage | Understand adoption |
| Errors | Debug user issues |
| Key conversions | Measure business outcomes |
Step 1: Import the Formo SDK
- Wagmi / React
- HTML Snippet
Step 2: Track a custom event
Use thetrack function with an event name and optional properties:
- Event name (required): Descriptive name for the action
- Properties (optional): Key-value pairs with additional context
Step 3: Track with volume, revenue, or points
For events with monetary value, use special properties:- Revenue attribution by traffic source
- Volume tracking per user
- Points/rewards leaderboards
Step 4: View custom events
After tracking events:- Go to Activity in the Formo Dashboard
- Filter by your custom event name
- See all event occurrences
- Wallet Profiles – User’s activity history
- Funnels – As conversion steps
- Charts – Query with SQL
Best practices
Naming conventions:| Good | Bad |
|---|---|
Swap Completed | swap |
Position Opened | click |
Referral Shared | event1 |
- Track at the moment the action completes (not when a button is clicked)
- For async actions, track on success (and optionally on failure)
Example: Tracking a swap flow
Track multiple events throughout a user flow:Example: Tracking feature adoption
Measure which features users engage with:Using custom events in funnels
Custom events can be funnel steps:- Go to Funnels > Create Funnel
- Add a step with Event type: Custom
- Select your custom event name
- Optionally add property filters
| Step | Event |
|---|---|
| 1 | page (visit /swap) |
| 2 | connect |
| 3 | Swap Started (custom) |
| 4 | Swap Completed (custom) |