Skip to main content

Analytics.CartView
component

Publishes a cart_viewed event to the Analytics.Provider component.

required
Was this section helpful?

Example

import {Analytics} from '@shopify/hydrogen';

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