Skip to main content

Overview

A successful analytics implementation starts with understanding what questions you want to answer. This guide helps you plan which events, properties, and integrations will give you the insights you need.

The Three Data Types

Cryptique unifies three types of data into complete user profiles:

1. Events (Off-Chain Behavior)

Events are actions users take on your website or dApp:
Event TypeExamplesWhy Track It
Page viewsLanding page, docs, pricingUnderstand content engagement
Feature usageButton clicks, form submissionsMeasure product adoption
ConversionsSignup, wallet connect, purchaseTrack funnel progression
EngagementScroll depth, time on page, video playsAssess content quality

2. User Properties (Who They Are)

Properties describe your users:
Property TypeExamplesWhy Track It
IdentityEmail, username, user_idIdentify returning users
DemographicsCountry, language, deviceSegment by audience
BehaviorPlan type, signup date, referral sourceSegment by lifecycle
Web3Connected wallets, primary chainSegment by crypto profile

3. Transactions (On-Chain Activity)

Blockchain transactions from your smart contracts:
Transaction TypeExamplesWhy Track It
Token swapsDEX trades, token purchasesMeasure trading engagement
NFT actionsMints, transfers, listingsTrack collector behavior
DeFi operationsStaking, LP provision, borrowingMeasure protocol usage
Custom contractsGame actions, governance votesTrack app-specific behavior

Planning Your Implementation

Step 1: Define Your Key Questions

Start by listing the questions you want to answer:
  • Which channels drive the most wallet connections?
  • What’s the conversion rate from landing page to first transaction?
  • How does paid traffic compare to organic for on-chain conversions?
  • Which content pieces lead to the highest-value users?
  • What percentage of users who connect a wallet make a transaction?
  • How long does it take from signup to first transaction?
  • What actions predict successful activation?
  • Where do users drop off in the onboarding flow?
  • How often do active users transact?
  • Which features correlate with higher transaction frequency?
  • What’s the retention curve for new users?
  • Are power users using the product differently?
  • What’s the lifetime value by acquisition source?
  • Which user segments generate the most protocol revenue?
  • How does on-chain activity correlate with TVL?
  • What predicts a user becoming a high-value trader?

Step 2: Map Questions to Events

For each question, identify what events you need: Question: “Which channels drive the most wallet connections?” Events needed:
  • page_view with UTM properties (auto-captured when auto-events are on)
  • wallet_connected (custom — call Cryptique.track() after connect, alongside Cryptique.walletAddress())
Properties needed:
  • utm_source, utm_medium, utm_campaign (auto-captured)
  • wallet_address, wallet_type (auto-captured)

Question: “What’s the conversion rate from landing page to first transaction?” Events needed:
  • page_view on landing page (auto-captured when auto-events are on)
  • wallet_connected (custom event you fire when the user connects)
  • On-chain transaction (captured via smart contract indexing)
Setup required:
  • Add your smart contract address in the dashboard

Step 3: Choose Your Auto-Events

Auto-events are off until you set auto-events="true" (or call Cryptique.enableAutoEvents()). The SDK emits many named events (clicks, scroll, forms, errors, performance, page_summary, etc.). Enable the bundle, then disable what you do not want:
Auto-EventDisable If…
text_selection / copy_actionClipboard or selection is sensitive
rage_click / dead_clickYou only want raw element_click
page_performanceYou already capture Web Vitals elsewhere
js_error / network_errorYou use another error pipeline (rare)
Configure in your SDK initialization:
<script>
  var script = document.createElement('script');
  script.src = 'https://cdn.cryptique.io/scripts/analytics/1.0.1/cryptique.script.min.js';  
  script.setAttribute('site-id', 'your-site-id');
  script.setAttribute('auto-events', 'true');
  script.setAttribute('auto-events-disabled-events', 'text_selection,copy_action');
  document.head.appendChild(script);
</script>
See Auto-Events for every event name and the JavaScript API. For wallets, use Cryptique.walletAddress() and custom track() events rather than expecting wallet_connect auto events.

Step 4: Plan Custom Events

Beyond auto-events, track custom events for key actions:
// Feature usage
Cryptique.track('feature_used', {
  feature_name: 'swap_calculator',
  input_token: 'ETH',
  output_token: 'USDC'
});

// Conversion milestones
Cryptique.track('onboarding_completed', {
  steps_completed: 5,
  time_to_complete: 180
});

// Errors and friction
Cryptique.track('transaction_failed', {
  error_type: 'insufficient_funds',
  attempted_amount: 1000
});

Step 5: Set Up Smart Contracts

Add your contracts to capture on-chain transactions:
  1. Go to Settings → Smart Contracts in the dashboard
  2. Click Add Contract
  3. Enter:
    • Contract address
    • Chain (Ethereum, Polygon, Base, etc.)
    • A friendly name (e.g., “Token Swap Contract”)
  4. Cryptique automatically indexes all transactions
Supported chains for smart contracts:
  • EVM: Ethereum, Polygon, Arbitrum, Optimism, Base, Avalanche, BSC, Fantom, and 20+ more
  • Non-EVM: Solana, Sui, Aptos, Near, and more

Step 6: Configure Wallet Enrichment

Enable wallet enrichment to automatically add user properties:
  • Wallet age: When the wallet was first active
  • Transaction count: Total transactions across chains
  • Token holdings: Major tokens and NFTs held
  • Activity patterns: Trading frequency, DeFi usage
Enrichment available on 9 chains: Ethereum, Polygon, BSC, Arbitrum, Optimism, Avalanche, Base, Fantom, Linea.

Event Naming Conventions

Use consistent snake_case naming:
Cryptique.track('swap_completed', { ... });
Cryptique.track('nft_minted', { ... });
Cryptique.track('liquidity_added', { ... });
Cryptique.track('onboarding_step_completed', { ... });
Property naming:
  • Use snake_case: token_amount, wallet_type, referral_source
  • Be specific: input_token not just token
  • Include units where relevant: amount_usd, duration_seconds

DeFi Protocol

// Core actions
'swap_initiated'
'swap_completed'
'liquidity_added'
'liquidity_removed'
'stake_initiated'
'stake_completed'
'unstake_completed'
'reward_claimed'

// User journey
'pool_viewed'
'token_selected'
'slippage_adjusted'
'transaction_approved'
'transaction_failed'

NFT Marketplace

// Core actions
'nft_viewed'
'nft_favorited'
'offer_made'
'offer_accepted'
'nft_listed'
'nft_purchased'
'nft_minted'

// User journey
'collection_viewed'
'search_performed'
'filter_applied'
'wallet_connected'

Web3 Game

// Core actions
'game_started'
'level_completed'
'item_purchased'
'item_equipped'
'battle_completed'
'reward_earned'

// User journey
'tutorial_started'
'tutorial_completed'
'character_created'
'guild_joined'

Implementation Checklist

1

Install the SDK

Add the CDN script or npm package to your site
2

Configure auto-events

Enable/disable auto-events based on your needs
3

Add custom events

Track key conversion and engagement events
4

Set up user identification

Call identify() when users log in
5

Add smart contracts

Index your contracts to capture on-chain data
6

Enable wallet enrichment

Turn on enrichment for deeper user profiles
7

Verify in dashboard

Check that events are flowing correctly

Next Steps

Quickstart

Get tracking in 5 minutes

Installation

Detailed installation options