---
title: "Track visitor interactions"
slug: "track-visitor-interactions"
abstract: "How to use Sitecore Search JS SDK to track visitor interactions in your React application."
---
# Track visitor interactions

At runtime, without requiring any additional code, Sitecore Search JS SDK [registers visitor interactions](https://doc.sitecore.com/search/en/developers/search-js-sdk-for-react/js-sdk-reference/events.html "Events"). The JS SDK is either directly or indirectly involved with these interactions. However, there are some events that the JS SDK has no awareness when they take place.

> [!note]
> To track events that do not involve the JS SDK, you need to track them verbosely.

When a visitor logs in or adds an item to the shopping cart, there is no way for the JS SDK to know these events without being specifically informed. All [funnel and some global events](https://doc.sitecore.com/search/en/developers/search-js-sdk-for-react/js-sdk-reference/events.html "Events") have to be verbosely tracked as shown in the following procedure to log in a visitor.

To dispatch an event verbosely to log in a user:

```js
import { trackUserLoginEvent } from '@sitecore-search/ui';

trackUserLoginEvent({
    id: '8743b52063cd84097a65d1633f5c74f5',
    email: 'user@example.com',
    // Optional. User's billing address
    address: {
        address_line_1: '123 Main Street',
        address_line_2: 'apartment 123',
        state: 'CA',
        zip: '90210',
        country: 'USA',
    },
    // Optional
    gender: 'female',
    groups: ['group1', 'group2'],
    addn_attributes: {
        email_subscriber: 'True',
        preferred_sizes: ['S', 'M', '32W', '30L'],
        home_store_code: '4321',
    }
});
```