Skip to main content

Overview

This guide covers implementation patterns for common Web3 analytics scenarios. Use these patterns to ensure comprehensive, accurate tracking.

Implementation Workflow

1

Plan Your Events

Define what you want to measure before writing code
2

Install SDK

Add Cryptique to your application
3

Configure Auto-Events

Enable/disable automatic tracking
4

Add Custom Events

Track business-specific actions
5

Set Up Identification

Link users across sessions
6

Integrate Wallets

Connect wallet events to user profiles
7

Verify & Iterate

Test tracking and refine

Common Patterns

Authentication Flow

Track the complete auth journey:

Wallet Connection Flow

Track wallet interactions:

DeFi Swap Flow

Track the complete swap journey:

NFT Mint Flow

Onboarding Flow

Track multi-step onboarding:

Error Tracking

Track errors for debugging:

Framework-Specific Patterns

React with Wagmi

Next.js App Router

Vue 3 Composition API

Groups (companies, teams, workspaces)

Model B2B or multi-tenant context with Groups: assign the user, then set properties on the group profile.
Use add_group / remove_group when a user can belong to multiple IDs under the same key. After identify(), the server may return group_memberships to hydrate assignments on a new device.

Testing Your Implementation

Debug Mode

Enable debug logging:

Verification Checklist

1

Check Live Events

Go to Dashboard → Live Events and perform actions
2

Verify User Profiles

Check that identify() creates/updates profiles
3

Test Wallet Linking

Connect wallet and verify it appears on profile
4

Check Properties

Verify all expected properties are present
5

Test Error Cases

Trigger errors and verify tracking

Common Issues

  • Check Site ID is correct
  • Verify domain is allowed in settings
  • Check for ad blocker interference
  • Look for console errors
  • Ensure identify() is called after SDK loads
  • Verify distinct_id is a string
  • Check that properties are valid JSON
  • Call Cryptique.walletAddress() with a valid address
  • Verify address format (0x…)
  • Confirm the SDK session initialized (Site ID, domain allowlist)
  • Check SDK isn’t initialized twice
  • Verify event handlers aren’t double-bound
  • Review SPA routing configuration

Next Steps

SDK Reference

Full method documentation

Build Reports

Analyze your data