Spindl
  • 👋Overview
    • Introduction
    • Attribution
    • Privacy
  • Your Spindl app setup
    • Managing team members
  • 🪄Features
    • 📈Onchain Attribution
      • 📉Plotting attribution
    • 📊Web3-native Analytics
      • Chart Builder
      • Event Selection and Filtering
      • Line Chart
      • Funnel
      • Cohort Retention
      • Sankey Diagram
      • Big Numbers
      • Pies and Donuts
    • 🧍‍♂️Audiences
      • Creating an audience
    • 🔗Short Links
      • 🖇️Custom Domains
    • 🤝Referrals
      • Management and reporting
      • ⏩Quick Start
      • ⛓️Technical Details
  • ⚙️Techncial
    • ⏩Start Here
    • Google GTM Guide
    • Javascript SDK / HTML Script Guide
      • ➡️Install
      • ➡️Wallet Connects
      • ➡️Page Views
      • ➡️Custom Events
      • ✅Verify That Events Are Sent Correctly
      • React, Next.js & Html Examples
      • Setup a Reverse Proxy
        • Using Next.js
        • Using Cloudflare Workers
        • Netlify
      • ➡️Referrals
      • Default vs Lite SDK Versions
      • Security
    • API
      • ➡️Short Links
      • ➡️Custom Events API
      • Data Exports
    • Android SDK
    • iOS (Swift) SDK
    • On-Chain
      • ➡️Rewards
  • Contact Spindl
  • Ads
    • ⏩Start Here
    • 📢Creative Specifications
      • Web Banner Ads
      • Discord Embeds
Powered by GitBook
On this page
  • Wagmi Tracking Wallet Connect
  • ThirdWeb Tracking Wallet Connect
  1. Techncial
  2. Javascript SDK / HTML Script Guide

Wallet Connects

This method should be called anytime a wallet is detected (on initial page load, wallet login, and wallet change):

spindl.attribute(walletAddress: string);
window.spindl.attribute(walletAddress: string);

In most frameworks, this is as simple as adding a single line in the lifecycle hooks.

Wagmi Tracking Wallet Connect

import spindl from "@spindl-xyz/attribution";
// import spindl from "@spindl-xyz/attribution-lite" // only for lite version customers

import { useAccount } from "wagmi";

// ...
const Component = () => {
  const { address } = useAccount();

  useEffect(() => {
    if (address) {
      spindl.attribute(address);
    }
  }, [address]);
  // ...
};

ThirdWeb Tracking Wallet Connect

import spindl from "@spindl-xyz/attribution";
// import spindl from "@spindl-xyz/attribution-lite" // only for lite version customers

const address = useAddress();

React.useEffect(() => {
  if (address) {
    spindl.attribute(address);
  }
}, [address]);
PreviousInstallNextPage Views

Last updated 8 months ago

⚙️
➡️