# Analytics.CartView Publishes a `cart_viewed` event to the `Analytics.Provider` component. ```js import {Analytics} from '@shopify/hydrogen'; export default function CartView() { return (

Cart

); } ``` ```ts import {Analytics} from '@shopify/hydrogen'; export default function CartView() { return (

Cart

); } ``` ## Props ### AnalyticsCartViewGeneratedType #### Returns: #### Params: - props: BasicViewProps export function AnalyticsCartView(props: BasicViewProps) { return ; } ### BasicViewProps ### data value: `OtherData` - OtherData: OtherData ### customData value: `OtherData` - OtherData: OtherData