Skip to main content

Analytics.CartView

Publishes a cart_viewed event to the Analytics.Provider component.

Anchor to props
props
required
Examples
import {Analytics} from '@shopify/hydrogen';

export default function CartView() {
return (
<div className="cart">
<h1>Cart</h1>
<Analytics.CartView />
</div>
);
}

Was this page helpful?