# Analytics.CustomView
Publishes a custom page view event to the `Analytics.Provider` component. The `type` prop must be preceded by `custom_`.
```js
import {Analytics} from '@shopify/hydrogen';
export default function Promotion() {
return (
);
}
```
```ts
import {Analytics} from '@shopify/hydrogen';
export default function Promotion() {
return (
);
}
```
## Props
### AnalyticsCustomViewGeneratedType
#### Returns:
#### Params:
- props: CustomViewProps
export function AnalyticsCustomView(props: CustomViewProps) {
return ;
}
### CustomViewProps
### type
value: ``custom_${string}``
### data
value: `OtherData`
### customData
value: `OtherData`