Setting Up Tracked Events
Tracked events are the conversions you care about, beyond the wallet connect that Mintfunnel records automatically. NFT mints, token purchases, swaps, contract calls, and any custom action you define in your own code. Once configured they appear in your reports, and can be...
Last updated
Tracked events are the conversions you care about, beyond the wallet connect that Mintfunnel records automatically. NFT mints, token purchases, swaps, contract calls, and any custom action you define in your own code. Once configured they appear in your reports, and can be promoted to key events so you get cost-per-conversion across every channel.
Before you start: the tracking snippet should be installed and verified, with at least one site registered. See Installing the tracking snippet.
The event types
- Wallet connect. Automatic. No contract, no setup. The SDK records it on every connect.
- Token purchase. Needs a contract address. Our indexer reads onchain transfer logs.
- NFT mint. Needs a contract address. The indexer watches mint events.
- Token swap. Needs a contract address. The indexer watches DEX swap events.
- Contract interaction. Needs a contract address. The indexer watches calls to that contract.
- Custom. No contract. You call `track()` from your own code.
Everything onchain is picked up automatically once configured. You do not write any code for those. Only custom events need a call from your site.
Adding one
- Click Analytics in the left navigation's Analytics section, then open the Setup tab.
- Scroll to Tracked Events and click Add event.
- Pick the event type.
- Give it a label, which is the readable name shown in reports, for example "Staking contract."
- For onchain types, add the chain it is deployed on, such as 1 for Ethereum or 8453 for Base, and the contract address.
- For contract interaction, you can optionally give a function signature, such as `stake(uint256)`, to narrow it to one entrypoint. Leave it blank to match any call.
- For custom events, enter the event name you will pass to `track()`.
- Click Save.
The event appears immediately. Use the row toggle to pause collection without deleting the configuration.
A note on swaps
For a normal token purchase on a DEX, use Token purchase with the address of the token being bought, rather than Token swap. The swap type only catches swaps where the user's wallet is named directly in the swap event, which is uncommon in router-based flows and will silently miss most Uniswap-style trades.
Custom events from your own code
Custom events do not come from an onchain index, so you fire them where the action happens:
`window.mintfunnelAttribution?.track('form_submit');`
With an optional USD value for return-on-spend reporting:
`window.mintfunnelAttribution?.track('purchase_complete', { value_usd: '49.99' });`
The name you pass must match the event name you configured, exactly. Names are case sensitive.
The `?.` guard means the call does nothing if the SDK has not loaded yet, so it is safe to include unconditionally.
Key events
A key event is the conversion you care about most. Marking one unlocks cost-per-key-event across all your channels, which is the number that actually tells you where to spend more.
- Go to the Key events tab on the Analytics page.
- Any event type that has fired at least once, or that you configured under Tracked Events, appears in the list.
- Toggle the one you want to optimize for.
You can mark several. Reporting then sums them into total key events and cost per key event.
Pick deliberately. A key event should be something with real value to your business, usually a mint or a purchase rather than a wallet connect, because it is what your ad platforms will optimize toward once you map it.
Editing and removing
- Edit with the pencil icon. Everything except the event type can be changed.
- Delete with the trash icon. This removes the configuration but never deletes attribution data already recorded.
- Pause with the row toggle, which stops collection without losing the setup.
Billing
Visitor-side wallet connects, custom events, and goal conversions count against your monthly tracked-event allowance. Pageviews use the separate traffic allowance. Indexed onchain activity from an already-attributed wallet does not consume tracked events, so a busy trader does not drain your allowance. See Plans, limits, and add-ons.
Common questions
Can I track the same contract on two chains? Yes. Add one entry per chain, each with its own chain ID.
How soon do onchain events appear? The indexer subscribes to the contract when you save the event, and picks up new transactions in near real time. Transactions from before you configured it are not backfilled.
My custom event is not appearing. Check that the name matches exactly. Then open your browser's network panel and look for a request to `/collect/attribution/v1`. A 200 response means the event was accepted, which points the problem at the name rather than the install.
Do I need to add wallet connect as a tracked event? No. It is recorded automatically. Add it only if you want a custom label, or want it in the key events picker before any connects have happened.
