Track every step of your DeFi user journey, from first visit to completed transaction, with Formo’s unified analytics.
This guide shows you how to set up conversion tracking for common DeFi actions: token swaps, staking, and liquidity provision.
What you’ll learn
- Set up end-to-end conversion tracking for DeFi protocols
- Create funnels that combine offchain and onchain events
- Measure conversion rates by traffic source
- Identify where users drop off in the conversion flow
Prerequisites
Part 1: Understanding DeFi Conversion Funnels
The typical DeFi user journey
Most DeFi conversions follow this pattern:
| Step | Event Type | Description |
|---|
| 1 | page | User lands on your app |
| 2 | connect | User connects their wallet |
| 3 | signature | User signs approval transaction |
| 4 | Contract event | User completes the target action (swap, stake, etc.) |
Formo captures steps 1-3 automatically. Step 4 requires contract event tracking.
Why this matters
Traditional analytics tools only see steps 1-2. Onchain analytics tools only see the final step, but not everything that matters is onchain. They can’t tell you:
- How many users who connected a wallet actually completed a transaction
- Which traffic sources drive the most completed swaps (not just wallet connects)
- When users drop off before connecting their wallet
- Where users drop off between approval and execution
- How many users leave before completing a transaction
Formo gives you the complete picture.
Part 2: How to Set Up Contract Event Tracking
Before creating funnels, configure Formo to track your smart contract events.
Step 1: Add your contract
Go to Project Settings > Contracts in the Formo Dashboard
Enter your contract details
- Chain: Select your deployment chain (Ethereum, Base, Arbitrum, etc.)
- Address: Your contract address
- Name: A friendly name (e.g., “Swap Router”)
Step 2: Select events to track
After adding the contract, select the relevant events:
For a DEX/Swap protocol:
Swap - When a swap is executed
Approval - When a token is approved (optional)
For a staking protocol:
Stake or Deposit - When tokens are staked
Unstake or Withdraw - When tokens are withdrawn
For a lending protocol:
Supply or Deposit - When collateral is supplied
Borrow - When assets are borrowed
Repay - When debt is repaid
Step 3: Verify events are flowing
Perform a test transaction on your app
Go to Activity in the Formo Dashboard
Confirm you see the contract event with decoded parameters
Part 3: How to Create a Swap Conversion Funnel
Now let’s build a funnel to track swap conversions.
Step 1: Navigate to Funnels
Go to Funnels in the left navigation
Name it "Swap Conversion Funnel"
Step 2: Define funnel steps
Add these steps in order:
| Step | Configuration |
|---|
| Step 1 | Event: page, Filter: path = /swap (or your swap page URL) |
| Step 2 | Event: connect |
| Step 3 | Event: Swap (your contract event) |
For DEXes with token approval, add an intermediate step for the Approval event between connect and swap.
Step 3: Set the conversion window
Choose a conversion window based on your typical user behavior:
- DEX swaps: 1-7 days (users often swap quickly)
- Staking: 7-14 days (users may research first)
- Complex DeFi: 14-30 days (longer consideration)
Step 4: Save and analyze
Click Save to create your funnel. You’ll see:
- Overall conversion rate: % of swap page visitors who completed a swap
- Step-by-step drop-off: Where users abandon the journey
- Absolute numbers: User count at each step
Part 4: How to Analyze by Traffic Source
Understanding which channels drive actual conversions (not just visits) is critical for DeFi growth.
Add a breakdown by referrer
Open your Swap Conversion Funnel
Select Referrer (or UTM Source for campaign tracking)
Now you can compare conversion rates across sources:
| Referrer | Visitors | Wallet Connects | Swaps | Conversion Rate |
|---|
| twitter.com | 1,000 | 400 | 120 | 12% |
| discord.com | 500 | 300 | 150 | 30% |
| defillama.com | 200 | 150 | 90 | 45% |
In this example, DefiLlama traffic converts 4x better than Twitter despite lower volume.
Key metrics to track
| Metric | What it tells you |
|---|
| Visit → Connect rate | Landing page effectiveness |
| Connect → Swap rate | Transaction UX quality |
| Overall conversion | End-to-end funnel health |
| By referrer | Channel quality |
| By device | Mobile vs desktop experience |
Part 5: How to Identify Drop-off Points
Common DeFi drop-off patterns
High drop-off at wallet connect:
- Wallet detection issues
- Unclear call-to-action
- Missing wallet support
High drop-off at approval:
- Confusing approval UX
- Users concerned about unlimited approvals
- Gas fee surprises
High drop-off at transaction:
- Slippage errors
- Insufficient balance
- Transaction failures
Using Conversion Insights
Formo’s Conversion Insights automatically identifies behaviors correlated with conversion:
Look for high-lift events
Example insight:
Users who viewed the “How it works” page are 2.3x more likely to complete a swap.
Use these insights to:
- Promote high-lift behaviors in your UX
- Add educational content where users drop off
- A/B test changes to low-converting steps
Part 6: Example Funnels
Staking funnel
| Step | Event | Expected conversion |
|---|
| 1 | Visit /stake | 100% (baseline) |
| 2 | Connect wallet | 40-60% |
| 3 | Approval event | 70-85% |
| 4 | Stake event | 80-95% |
Liquidity provision funnel
| Step | Event | Expected conversion |
|---|
| 1 | Visit /pool | 100% (baseline) |
| 2 | Connect wallet | 30-50% |
| 3 | Approval (Token A) | 60-80% |
| 4 | Approval (Token B) | 90-95% |
| 5 | AddLiquidity event | 85-95% |
Multi-step DeFi flow
For complex protocols with multiple transactions:
| Step | Event |
|---|
| 1 | Visit landing page |
| 2 | Connect wallet |
| 3 | Deposit collateral |
| 4 | Borrow assets |
| 5 | Use borrowed assets (custom event) |
Part 7: How to Set Up Alerts
Get notified when high-value conversions happen.
Whale swap alert
Configure the alert
- Event: Your
Swap contract event
- Condition:
net_worth > 100000
- Notification: Email or Slack webhook
Now you’ll know instantly when whales use your protocol.
Failed transaction alert
Track when swaps fail to identify UX issues:
Configure the alert
- Event:
transaction
- Condition:
status = failed
- Notification: Slack webhook
Summary
You’ve learned how to:
- Configure contract events for your DeFi protocol
- Create conversion funnels combining offchain and onchain events
- Analyze by traffic source to find your best channels
- Identify drop-off points and use Conversion Insights
- Set up alerts for high-value transactions
Next steps