> For the complete documentation index, see [llms.txt](https://docs.spindl.xyz/spindl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spindl.xyz/spindl/techncial/javascript-sdk-html-script-guide/wallet-connects.md).

# Wallet Connects

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

{% tabs %}
{% tab title="NPM SDK" %}

```javascript
spindl.attribute(walletAddress: string);
```

{% endtab %}

{% tab title="HTML Script SDK" %}

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

{% endtab %}
{% endtabs %}

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

### Wagmi Tracking Wallet Connect

```typescript
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

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