` with the SDK Write key found in your project settings.
If you are not using [wagmi hooks](https://wagmi.sh/react/api/hooks) (`useWriteContract`, `useSendTransaction`, `useSignMessage`), follow the **non-wagmi React or Next.js instructions** instead.
Transaction and signature autocapture requires the use of wagmi hooks. Direct calls to `@wagmi/core` or viem won't be tracked automatically.
#### 3. Identify users
Call [`identify`](/data/events/identify) at the start of every session or page load to link a wallet address to a session.
```tsx theme={null}
import { useFormo } from "@formo/analytics";
import { useAccount } from "wagmi";
const HomePage = () => {
const { address } = useAccount();
const analytics = useFormo();
useEffect(() => {
if (address && analytics) {
analytics.identify({ address });
}
}, [address, analytics]);
}
```
#### 4. Track custom events
Formo autocaptures wallet events (connect, disconnect, signature, transaction, chain changes). You do not need to track them manually.
For other in-app actions, use the [`track`](/sdks/web#track-events) function to track custom events specific to your app.
```tsx theme={null}
import { useFormo } from '@formo/analytics';
const HomePage = () => {
const analytics = useFormo();
useEffect(() => {
// Track a custom event
analytics.track('Swap Completed', { volume: 100 });
}, [analytics]);
return Welcome to the Home Page!
;
};
export default HomePage;
```