---
title: "identity"
slug: "cloud-sdk-events-browser-identity"
abstract: "The identity function sends an IDENTITY event from the browser side."
---
# identity

|     |     |
| --- | --- |
| Type | Function |
| Import path | `@sitecore-cloudsdk/events/browser` |

Sends an [`IDENTITY`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-concepts/concepts-tracking/events/identity-events.html "IDENTITY events") event.

## Signature

```typescript
export async function identity(
  identityData: IdentityData
): Promise<EPResponse | null>
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `identityData` | [`IdentityData`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-events/cloud-sdk-events-browser/interfaces/cloud-sdk-events-identitydata.html "IdentityData") | Required.<br><br>Data for [`IDENTITY`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-concepts/concepts-tracking/events/identity-events.html "IDENTITY events") events. |

## Return value

Returns a promise.

## Examples

:::tab{title="Next.js"}

Example 33. Running the identity function

:::tab{title="Next.js"}
> [!note]
> To run this function, you have to first [initialize](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-events/cloud-sdk-events-browser/functions/cloud-sdk-core-browser-cloudsdk.html "CloudSDK") the Cloud SDK.
>
> See [more examples](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-events/cloud-sdk-events-browser/functions/identity-events.html "IDENTITY events") and [other data](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-events/cloud-sdk-events-browser/functions/cloud-sdk-events-identitydata.html "IdentityData") you can include in the event.

Here's an example of how to use the `identity` function:

```typescript
"use client"; // Used only in Next.js App Router
import { identity } from "@sitecore-cloudsdk/events/browser";

export default function Component(){
  const sendIdentityEvent = async () => {
    const eventData: any = {
      identifiers: [
        {
          id: "123456",
          provider: "BXLP"
        }
      ]
    };

    await identity(eventData);
    console.log("Sent IDENTITY event.");
  };

  return (
    <div>
      <button onClick={sendIdentityEvent}>send IDENTITY event</button>
    </div>
  );
};
```

:::

:::