# Analytics.CartView
Publishes a `cart_viewed` event to the `Analytics.Provider` component.
```js
import {Analytics} from '@shopify/hydrogen';
export default function CartView() {
return (
);
}
```
```ts
import {Analytics} from '@shopify/hydrogen';
export default function CartView() {
return (
);
}
```
## Props
### AnalyticsCartViewGeneratedType
#### Returns:
#### Params:
- props: BasicViewProps
export function AnalyticsCartView(props: BasicViewProps) {
return ;
}
### BasicViewProps
### data
value: `OtherData`
- OtherData: OtherData
### customData
value: `OtherData`
- OtherData: OtherData