---
title: "PageViewData"
slug: "cloud-sdk-events-pageviewdata-1748077"
abstract: "The PageViewData interface represents data for VIEW events."
---
# PageViewData

|     |     |
| --- | --- |
| Type | Interface |
| Extends | [`EventAttributesInput`](https://doc.sitecore.com/sdk/en/developers/006/cloud-sdk/cloud-sdk-reference/cloud-sdk-events/cloud-sdk-events-browser/interfaces/cloud-sdk-events-eventattributesinput.html "EventAttributesInput") |
| Import path | `@sitecore-cloudsdk/events/server` |

Data for [`VIEW`](https://doc.sitecore.com/sdk/en/developers/006/cloud-sdk/cloud-sdk-concepts/concepts-tracking/events/view-events.html "VIEW events") events.

## Signature

```typescript
export interface PageViewData extends EventAttributesInput {
  pageVariantId?: string;
  referrer?: string;
  includeUTMParameters?: boolean;
  extensionData?: ExtensionData;
  searchData?: NestedObject;
}
```

## Properties

| Name | Type | Description | Value |
| --- | --- | --- | --- |
| pageVariantId | string | Optional.The ID of a personalized page variant. | "page_variant_3" |
| referrer | string | Optional.The URI of the webpage that linked to the webpage where the event was captured.Default for browser-side events: inferred from document.referrer. If document.referrer is an empty string, the value will be set to null.Default for server-side events: null. | "https://www.example.com/"null |
| includeUTMParameters | boolean | Optional.Whether to add every UTM parameter from the URL of the current webpage to the event object.Default: true. | true |
| extensionData | ExtensionData | Optional.Any custom data to collect about an event in addition to the other attributes provided for the event data. | { customKey: "customValue" } |
| searchData | NestedObject | Optional.ImportantRequires a Sitecore Search subscription.Sitecore Search data about the event.If set, the event and all its data will be available in Sitecore Search.Construct according to the Sitecore Search Events API reference and data model. | N/A |

## Examples

Example 49. VIEW event with optional data

Here's an example event data object for a `VIEW` event with optional event data and extension data:

```typescript
const eventData: any = {
  language: "EN",
  page: "home",
  channel: "WEB",
  currency: "EUR",
  pageVariantId: "page_variant_3",
  extensionData: {customKey: "customValue"}
};
```

By default, `VIEW` events include UTM parameters. Consider the following URL:

```http
https://myretailsite.com?utm_source=newsletter&utm_medium=email&utm_campaign=summer_sale&utm_term=running+shoes
```

A `VIEW` event captured on the previous URL will contain all the UTM parameters in the event data:

```json
{
  "language": "EN",
  "page": "home",
  "channel": "WEB",
  "currency": "EUR",
  "pageVariantId": "page_variant_3",
  "extensionData": "{'customKey': 'customValue'}",
  "utm_source": "newsletter",
  "utm_medium": "email",
  "utm_campaign": "summer_sale",
  "utm_term": "running shoes"
}
```