---
title: "entityView"
slug: "cloud-sdk-search-browser-entityview"
abstract: "The entityView function sends an entity page view event from the browser side."
---
# entityView

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

Sends an [entity view event](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-concepts/concepts-tracking/events/sitecore-search-events.html "Sitecore Search events").

## Signature

```typescript
export async function entityView(
  entityViewEventParams: EntityViewEventParams
): Promise<EPResponse | null>
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `entityViewEventParams` | [`EntityViewEventParams`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-search/cloud-sdk-search-browser/interfaces/cloud-sdk-search-entityvieweventparams.html "EntityViewEventParams") | Data for [entity page view events](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-concepts/concepts-tracking/events/sitecore-search-events.html "Sitecore Search events"). |

## Return value

Returns a promise.

## Examples

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

Example 73. Running the entityView 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-search/cloud-sdk-search-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-search/cloud-sdk-search-browser/functions/sitecore-search-events.html "Sitecore Search events") and [other data](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-search/cloud-sdk-search-browser/functions/cloud-sdk-search-entityvieweventparams.html "EntityViewEventParams") you can include in the event.

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

```typescript
import { entityView } from "@sitecore-cloudsdk/search/browser";
import type { EntityViewEventParams } from "@sitecore-cloudsdk/search/browser";

const eventParams: EntityViewEventParams = {
  entity: { entity: "product", id: "1" },
  pathname: "/detail-page/1"
};

entityView(eventParams);
```

:::

:::