--- title: Analytics.CartView description: Publishes a `cart_viewed` event to the `Analytics.Provider` component. api_version: 2026-01 api_name: hydrogen source_url: html: >- https://shopify.dev/docs/api/hydrogen/latest/components/analytics/analytics-cartview md: >- https://shopify.dev/docs/api/hydrogen/latest/components/analytics/analytics-cartview.md --- # Analytics.CartView Publishes a `cart_viewed` event to the `Analytics.Provider` component. ## analyticsCartView(**[props](#props-propertydetail-props)**) ### Parameters * **props** **BasicViewProps** **required** ### BasicViewProps * customData ```ts OtherData ``` * data ```ts OtherData ``` ### OtherData Examples ### Examples * #### example ##### Description This is the default example ##### JavaScript ```js import {Analytics} from '@shopify/hydrogen'; export default function CartView() { return (