➡️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);

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]);

Last updated