Analytics and Tracking

view_cart

Also called Cart view event

The GA4 ecommerce event fired when a shopper opens the basket and sees the full order and its total.

Quick facts: view_cart

Category
Analytics and Tracking
Also called
Cart view event
Level
Beginner
Affects
Funnel reporting, remarketing audiences, checkout diagnosis
Where to see it
GA4 DebugView, GA4 funnel exploration, Google Tag Manager Preview
In this article4
  1. How view_cart works
  2. Why view_cart matters
  3. Common mistakes with view_cart
  4. How to act on it

How view_cart works

This is the GA4 event for the moment a shopper opens the basket and looks at it. It fires on the cart page, or when a slide-out cart drawer is opened, and it carries the whole basket with it: every item, each one’s identifier, name, price and quantity, plus the total value and the currency.

Because it reports the basket rather than a single product, it is the first event in the sequence where the numbers should tie back to something a shop owner recognises. If the value in the event does not match the total the shopper is looking at, the tracking is wrong and everything downstream of it will be wrong too.

Why view_cart matters

It marks the border between browsing and buying. Someone who has opened the basket has assembled an order and is deciding whether to go through with it, which makes them a far warmer audience than a product page visitor. It is one of the more reliable remarketing signals a shop has.

It also gives the ecommerce funnel a step that would otherwise be missing. Without it the report jumps straight from adding an item to starting checkout, and a shop losing people at the basket — usually to the delivery charge appearing for the first time, or to a surprise about payment options — cannot see where they went. In Nepal, where a shopper may reach the basket on a phone and then want to pay cash on delivery, that step deserves its own measurement.

Common mistakes with view_cart

The first is firing it on a mini-cart that opens automatically every time something is added. That turns a deliberate decision into an automatic side effect and inflates the step out of all recognition. Fire it when the shopper opens the basket themselves, or on the cart page load.

The second is sending it with no items — a value and nothing else. The event is meant to describe the basket, so an empty item array throws away the most useful part of it. The third is a single-page shop where the cart drawer opens and closes repeatedly without a page load; if the tag is bound to a page view it will never fire at all, and the funnel will show nobody ever reaching the basket.

How to act on it

Look at the drop between the basket view and the start of checkout, and treat a wide gap as a checkout design problem rather than a traffic problem. The usual culprits are visible before you look at any report: delivery charges that only appear at this step, a forced account creation, or payment methods that do not match how your customers actually pay.

Then build on it. A basket-viewers audience is worth having in both Google Ads and Meta, and it is worth an abandoned-basket email if you have the address. Before either, confirm the event fires once per basket view and carries the right total — a check that belongs in every analytics and tracking setup for a shop.

Do and do not

Do

  • Fire it when the shopper opens the basket deliberately
  • Send every item plus the basket total and currency
  • Compare it against checkout starts to find the leak

Do not

  • Fire it on an auto-opening mini-cart after each add
  • Send a value with an empty item array
  • Bind it to a page view on a single-page shop

Questions people ask about this

Do I need view_cart if I already track add_to_cart and purchase?

You can run without it, but you lose the step where most shops leak orders. Adding an item and completing a purchase are far apart, and the basket sits between them. Without the basket view you can see that people vanished, but not whether they vanished before or after seeing the delivery charge and the final total.

Should a mini-cart or slide-out drawer fire view_cart?

Only when the shopper opens it deliberately. If your drawer pops open automatically after every add, firing the event there means every cart addition is also counted as a basket view, and the funnel step becomes meaningless. Bind the tag to the shopper clicking the cart icon, or to the full cart page loading.

What value should view_cart send?

The total value of the goods in the basket, in the same currency as the rest of your ecommerce events, and normally excluding delivery and tax so it stays comparable with the purchase value. Send the items too. A value with no item array still counts the step but tells you nothing about what people were about to buy.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.