DEV Community

Cover image for How Web3 Attribution Works: Connecting Marketing Campaigns to On-Chain Conversions
Maxim Astashev
Maxim Astashev

Posted on

How Web3 Attribution Works: Connecting Marketing Campaigns to On-Chain Conversions

In traditional marketing, Google Analytics tracks the entire user journey. In crypto, the conversion happens on a completely different system — a blockchain. This guide explains how web3 attribution works technically, the different approaches, and how to implement it.

The Attribution Gap in Crypto

Here's a typical crypto user journey:

  1. User sees your Twitter thread
  2. Clicks link to your website
  3. Browses your dApp, connects wallet
  4. Goes to Uniswap, swaps $500 into your token

Google Analytics sees steps 1–3. But step 4 — the actual conversion — happens on Ethereum. GA4 is blind to it.

Web3 attribution bridges this gap.

How It Works: Three Approaches

Approach 1: UTM Links + Wallet Registration

The simplest and most reliable method.

Setup:

  1. Create unique tracking links for each campaign (like UTMs in GA4)
  2. Each link carries source/medium/campaign tags

User journey:

  • Campaign link carries utm_source=twitter, utm_medium=kol_alpha
  • User clicks, lands on your site
  • Cookie stores the attribution data
  • User connects wallet (0xABC...)
  • System records: wallet 0xABC = attributed to twitter/kol_alpha

On-chain monitoring:

  • Cron job runs every hour
  • Queries Etherscan/Helius API for wallet 0xABC activity
  • Wallet 0xABC swapped 500 USDC into YOUR_TOKEN on Uniswap
  • Conversion recorded, attributed to twitter/kol_alpha

Pros: Deterministic, no false positives, no SDK needed

Cons: Only tracks users who click your link first

Tools using this approach: Web3 Trackers, most self-serve tools

Approach 2: SDK + Wallet Intelligence

More complex. Requires integrating an SDK into your dApp.

Setup:

  1. Install SDK in your frontend
  2. SDK captures page views, wallet connections, and on-chain events
  3. Backend enriches wallet data with on-chain history

User journey:

  • User visits your dApp
  • SDK tracks page views with UTM data
  • User connects wallet
  • SDK captures wallet address + session data
  • Backend enriches: wallet age, balance, DeFi history
  • Monitors for on-chain conversions

Pros: Richer data, product analytics included

Cons: Requires engineering, SDK dependency

Tools using this approach: Formo, Safary

Approach 3: Identity Graph (Enterprise)

The most sophisticated approach. Builds probabilistic links between web identities and wallet addresses.

How it works:

  • ENS names linked to Twitter handles
  • Wallet addresses seen on known websites
  • Social login + wallet connect correlation
  • Behavioral fingerprinting
  • Result: probabilistic identity graph — "User who clicked ad X is likely wallet 0xDEF"

Pros: Broadest coverage, enables retargeting

Cons: Privacy concerns, probabilistic (not deterministic), enterprise pricing

Tools using this approach: Addressable, Spindl

Technical Implementation: The UTM Approach

Here's what the technical architecture looks like for approach 1:

1. Link Builder (Frontend)

Generates tracking URLs with embedded attribution parameters:

  • https://yourapp.com/r/abc123 redirects to https://yourapp.com?ref=abc123
  • Sets cookie: w3t_ref=abc123, w3t_source=twitter, w3t_medium=kol

2. Touch Recording (Backend)

When a wallet connects, the backend records:

  • Wallet address: 0xABC...
  • Ref token: abc123
  • Source: twitter
  • Medium: kol_alpha

3. On-chain Monitor (Cron)

Periodically checks attributed wallets for activity:

  • Query Etherscan API for wallet transactions
  • Filter: Is this a swap/mint/deposit to our contracts?
  • If yes: Record conversion, link to attribution data

4. Attribution Logic

Standard last-non-direct-touch model:

  • If wallet has multiple touches, use the last touch that has a source (not "direct")
  • Attribute conversion to that source/medium/campaign

Key Metrics This Enables

Once you have attribution data, you can calculate:

  • CAC (Cost per Acquiring Wallet) — Link spend divided by wallets that converted
  • Conversion Rate — On-chain conversions divided by wallet connections
  • Channel ROI — Value generated per channel divided by spend per channel
  • Wallet Quality — Score based on age, balance, DeFi activity (filters bots)
  • Attribution Window — Time between first click and on-chain conversion

Which Chains?

Different tools support different chains:

  • Ethereum + L2s (Base, Arbitrum) — Most tools support these via Etherscan API
  • Solana — Supported by some tools via Helius or QuickNode APIs
  • TON — Emerging support. Web3 Trackers supports it via TonAPI
  • Other EVM chains — Usually supported if Etherscan-compatible API exists

Getting Started

  1. Define your conversion — What on-chain action = success?
  2. Pick an approach — UTM links (simplest), SDK (richer), or identity graph (enterprise)
  3. Choose a tool — Self-serve (Web3 Trackers: free tier, $99–249/mo) or enterprise (Spindl, Addressable)
  4. Create tracking links — One per channel, campaign, and influencer
  5. Attach spend — Track how much you spent per link for ROI calculations
  6. Monitor and optimize — Watch which channels drive real on-chain conversions

Conclusion

Web3 attribution isn't magic — it's connecting two data sources (web analytics + blockchain data) through a shared identifier (the wallet address). The simplest approach (UTM links + wallet registration) takes 15 minutes to set up and gives you immediate visibility into which campaigns drive on-chain conversions.

The key is to start tracking now. Every day without attribution is a day of wasted marketing budget.


Resources:

Top comments (0)