How Mintfunnel Attribution Works (And How to Set It Up)
Concept and setup walkthrough for advertisers. Register your site, install the snippet, wire up wallet connects, and track onchain conversions.
Last updated
What is attribution?
Attribution answers a simple question: did my ads actually drive action? Mintfunnel's attribution feature shows you which ad clicks led to real wallet connects and onchain actions on your website, so you can see what's working, not just guess.
How it works
Here's the journey from ad click to your dashboard, in plain English:
- Someone clicks your ad. Mintfunnel quietly adds a unique tracking tag to the link they follow to your website. You don't need to do anything; this happens automatically.
- They land on your site. Your site is running a small piece of Mintfunnel tracking code (more on how to add this below). That code reads the tracking tag and remembers it.
- They take an action. When the visitor connects their wallet, mints an NFT, buys a token, or interacts with a contract you've configured, Mintfunnel links that action back to the ad that brought them in.
- It shows up in your dashboard. Within moments, you'll see the attributed event under your campaign's Attribution tab.
This works across domains, too. A visitor who clicks an ad to your landing page, then jumps to a separate mint.yoursite.com to buy, still gets attributed end-to-end as long as both domains are registered.
The attribution window
Not everyone connects their wallet the second they click an ad. Someone might click, browse around your site for a few days, and connect later.
The attribution window is how long Mintfunnel waits before it stops crediting an ad click. The default is 30 days. If someone clicks your ad and connects a wallet within 30 days, it counts. You can shorten this window if you prefer a tighter measurement, but 30 days is the industry standard.
What you'll need
- A Mintfunnel advertiser account
- Access to edit your landing page's
<head>(directly, or via a tool like Google Tag Manager) - One existing or planned ad campaign in Mintfunnel
Estimated time: 10 to 15 minutes
Part 1: Register your site
[Image]
- In Mintfunnel, go to Attribution > Setup.
- Under Funnel domains, click Add a domain.
- Type your domain (for example,
yourtoken.com) and click Register domain. You can paste a full URL likehttps://yourtoken.com/landing. Mintfunnel strips the prefix and path for you. Just give it the part of the address that identifies the site. - The new domain appears in the table with an Install status of "Not installed." That's expected; the next part fixes it.
If you have multiple landing pages on different domains (for example, a homepage on yourtoken.com plus a mint flow on mint.yourtoken.com), register each one separately. Each domain gets its own install code.
Part 2: Install the snippet on your site
[Image]
Open the domain you just registered (click Open on its row). You'll see a code snippet that looks something like:
<script async src="https://mintfunnel-cdn.com/sdk/v2/latest.js" data-token="abc123…unique to your site…" data-api="https://app.mintfunnel.co"></script>
Option A: Paste it directly into your site's HTML
If you can edit your site's source code, paste the snippet into the <head> of every page where attribution should work (or globally, in a layout or template file).
Option B: Paste it into Google Tag Manager
If you use Google Tag Manager (GTM) on your site:
[Image]
- In Mintfunnel, click Google Tag Manager above the snippet. The snippet swaps to a format that works inside GTM.
- In GTM, create a new Custom HTML tag.
- Paste the GTM-formatted snippet in.
- Set the trigger to All Pages.
- Click Save, then Submit, then Publish at the top right of GTM. Saving alone doesn't make it live. Publish is the step that pushes the tag to your real site.
Why two formats? GTM's Custom HTML feature silently strips some attributes from external script tags, which breaks the default install. The "Google Tag Manager" version is identical in behavior but wrapped in a way that survives GTM's processing.
Verify the snippet is live
Once installed, visit any page on your site. Within seconds the Install status in Mintfunnel changes from "Not installed" to Active with a green dot. If it stays gray for more than a minute, see Troubleshooting below.
Part 3: Tell us about wallet connects
The tracking snippet handles page views and outbound clicks automatically. To also track wallet connects (and any onchain action the connected wallet performs afterward), you need to add one line of code to your wallet-connect handler.
Wherever your site connects a wallet (wagmi, RainbowKit, ConnectKit, Privy, Coinbase Wallet SDK, or any custom flow), call this immediately after the wallet returns an address:
window.mintfunnel.identify({ address: '0x...', // the connected wallet address chainId: 8453, // the chain ID (8453 = Base, 1 = Ethereum, etc.)});
wagmi / RainbowKit / ConnectKit example
If you're using wagmi (or anything that exposes useAccount), add this somewhere on your landing page or in your app's main provider:
import { useEffect } from 'react';import { useAccount } from 'wagmi';function MintfunnelIdentifier() { const { address, isConnected, chainId } = useAccount(); useEffect(() => { if (isConnected && address) { window.mintfunnel?.identify({ address, chainId: chainId ?? 8453, }); } }, [address, isConnected, chainId]); return null;}
Drop <MintfunnelIdentifier /> anywhere inside your wagmi provider tree. It quietly fires whenever a wallet connects, switches chains, or reconnects on page reload.
Privy, Dynamic, and other auth wallets
Most auth-wallet libraries expose the connected address through a hook or callback. Anywhere you have access to the address, call window.mintfunnel.identify({ address, chainId }). The SDK validates the address shape internally, so calling it with an unexpected value is safe. It just gets ignored.
Part 4 (optional): Track onchain conversions
If you want Mintfunnel to surface specific onchain actions as conversions (NFT mints, token purchases, custom contract calls), add them under Setup > Tracked events:
- Click Add event.
- Pick the event type: usually Token purchase, NFT mint, or Contract interaction.
- Paste the contract address (for example, your NFT contract or the staking pool your visitors interact with).
- Optionally label it (for example, "Stand With Crypto mint").
- Save.
Any wallet we've seen on your site that later interacts with that contract, even days later, gets credited back to the ad that originally drove the visit.
See the full Tracked Events guide for details on each event type.
Note about token swaps. For typical token purchases on a DEX like Uniswap, use Token purchase with the output token's contract address (for example, the USDC contract on Base if you're tracking ETH-to-USDC swaps). The "Token swap" event type only catches swaps where the user wallet is named directly in the swap event, which is less common in router-based flows.
Verifying end-to-end
The fastest way to confirm everything works:
- Open one of your active ad campaigns in another browser (or incognito).
- Click the ad and let it land you on your registered site.
- Connect a wallet and perform whatever conversion you care about (mint, swap, etc.).
- Back in Mintfunnel, go to Attribution > Activity. Within a minute or two you should see a row for your wallet connect with the campaign attached, plus any onchain event you triggered.
If the entries don't show up within a few minutes, see Troubleshooting below.
What you'll see in your dashboard
Once attribution is running, your campaign's Attribution tab shows:
Metric
What it means
Attributed connects
Wallet connects that can be traced back to a click on your Mintfunnel ad
Unique wallets
How many distinct wallets connected (one person connecting twice still counts as one)
Attribution rate
The percentage of ad clicks that resulted in a wallet connect, a key signal of campaign quality
Median time to connect
How long after clicking your ad people typically connect their wallet (helps you understand user behavior)
Wallet value signals
A snapshot of the balance in each attributed wallet across major tokens, useful for understanding audience quality
You can also export a full list of attributed wallets as a spreadsheet from the Attribution tab.
Troubleshooting
Install status stays "Not installed"
- Hard-refresh the page where you installed the snippet (Cmd+Shift+R / Ctrl+Shift+R) to bust any cached HTML.
- In your browser's DevTools, open the Console and type
window.mintfunnel.version. If the SDK loaded correctly, this returns "2.0.x". If it returnsundefined, the snippet didn't execute. - If you installed via GTM: confirm you clicked Publish in GTM after saving. Saved-but-unpublished changes don't reach your site.
- If you installed directly in HTML: confirm the snippet is inside
<head>and that no other tag (CSP, sandbox attributes) is blocking it.
Install status shows "Active" but wallet connects don't appear
- The snippet alone tracks page loads. Wallet connects need the
window.mintfunnel.identify({ address, chainId })call described in Part 3. Without it, Mintfunnel never sees the connection. - Add the call into your connect handler and trigger a fresh test connect.
The Connect Wallet button doesn't activate on my site
Not a Mintfunnel issue. That's usually a wallet-library setup problem on your site (commonly a missing RPC URL in wagmi/viem). Check your browser console for errors. The Mintfunnel snippet is fully passive and never blocks the connect button.
Conversions are showing up under the wrong campaign
Conversions credit to the most recent ad click that brought the visitor to your site within the attribution window (default 30 days). If a visitor clicked multiple ads, the most recent click wins. You can adjust the window under Setup > Attribution window.
I see an event I don't recognize
If you see a token_purchase event for an amount you didn't expect, it might be:
- An incoming token transfer from another wallet you control. We ignore these now. Wallet-to-wallet self-sends don't count as purchases.
- A fee refund or rebate from a paymaster or smart wallet.
- A dust airdrop unrelated to your campaigns.
Only transfers originating from a smart contract (a DEX router, pool, or marketplace) count as a token_purchase. EOA-to-EOA transfers are filtered out.
Frequently asked questions
Do I need to set this up for every campaign? No. Once you save your account-level tracking settings, attribution is automatically enabled for all your campaigns. You can turn it off for individual campaigns if needed. The default is on for everything.
What if multiple campaigns send traffic to the same page? No problem. Mintfunnel figures out which campaign to credit based on the tracking tag in the link. You don't need to do anything differently.
Is this privacy-compliant? Yes. Mintfunnel's tracking code respects cookie consent banners automatically. If a visitor hasn't consented, no data is collected. Mintfunnel also supports GDPR opt-out and doesn't store raw IP addresses.
How do I know it's working? Use the Verify Install button on your campaign's Attribution tab. If the code is installed correctly and someone has visited your site, it will confirm within about 60 seconds.
My developer says they can't find the tracking code. Where is it? It lives in the Setup tab of your Attribution hub. You can also find a copy-paste version on your campaign's Attribution tab.
What if I want to stop attribution for one campaign? Go to that campaign's Attribution tab and toggle attribution off. This won't affect your other campaigns.