Analytics and Tracking

view_cart

Also called view cart event, view basket

A GA4 recommended ecommerce event sent when a shopper opens their basket, carrying its value, currency and items.

Quick facts: view_cart

Category
Analytics and Tracking
Also called
view cart event, view basket
Level
Intermediate
Affects
GA4 ecommerce funnels, basket abandonment analysis, remarketing audiences
Where to see it
GA4 DebugView, Google Tag Manager preview mode, GA4 funnel explorations
In this article4
  1. How view_cart works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

view_cart is a recommended GA4 ecommerce event that your site sends when a shopper opens their basket, whether that is a full basket page or a slide-out panel. It carries the basket’s total value, the currency and the list of products in it, so GA4 can show how many people who added something went on to look at what they had chosen.

How view_cart works

GA4 does not collect ecommerce events on its own. Your shop platform, a plugin or your developer has to send view_cart, usually by pushing it to the data layer for Google Tag Manager to pass on. The event has three parts:

  • currency A three-letter code, which for a UK shop is GBP.
  • value The total of the items in the basket, worked out as price multiplied by quantity for each line.
  • items The items array, one entry per product with at least an item ID or name, plus price and quantity, and ideally brand, category and variant.

In the standard ecommerce sequence, view_cart sits between add_to_cart and begin_checkout. Plenty of shops let people jump from a mini-basket straight to checkout without ever seeing a basket page, so the step can legitimately be skipped. Meta has no standard event for viewing a basket, so if you want the same signal in Meta you would send a custom event.

Why it matters

The basket is where a shopper sees the full cost for the first time, and it is often where intent dies. Comparing the people who added to basket, viewed the basket and began checkout shows which step loses them. A large drop between view_cart and begin_checkout points to something on the basket itself.

The usual suspects on UK shops are delivery charges that only appear at this stage, a minimum order value, a forced account sign-up before checkout, or a prominent discount code box that sends people off to search for codes. Each of those is a fixable page problem, and view_cart is the event that lets you measure whether the fix worked. With the right consent in place, the event can also feed audiences for people who looked at their basket and left, which are usually worth more than general site visitors.

Common mistakes

  • Firing only on the full basket page while most shoppers use the slide-out panel, which makes the step look far weaker than it is.
  • Firing on every quantity change. Changes in quantity belong to add_to_cart and remove_from_cart; view_cart should fire once per view.
  • Sending value in pence, as a text string with a pound sign, or on a different VAT basis from your purchase event, so basket and revenue figures cannot be compared.
  • Leaving out currency. GA4 expects a currency whenever a value is sent, and without one the value may not be recorded properly.
  • Not clearing the previous ecommerce object in the data layer before pushing a new one, so products from an earlier event leak into this one.
  • Letting a shop app and a hand-built Tag Manager tag both send the event, which doubles it.

How to act on it

Open your shop in Tag Manager preview mode, add two products, open the basket in every way your theme allows, and watch the events arrive in GA4’s DebugView. Check that the value matches the basket on screen and that the items list is complete.

Then build a funnel exploration from view_item to purchase with view_cart as a step if most buyers pass through the basket, and read it by device, because basket layouts often break on mobile first. If the drop after the basket is the biggest in the funnel, fix the basket page before spending more on traffic. Getting these events right is part of the set-up when I run Facebook ads for ecommerce, because campaign optimisation depends on the shop reporting what really happens.

Do and do not

Do

  • Fire it for the slide-out basket as well as the basket page
  • Send currency as GBP with every value
  • Use the same VAT basis as your purchase event

Do not

  • Fire it on every quantity change
  • Send value as text with a pound sign
  • Let two tools send the same event

Questions people ask about this

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

It is optional, but it fills a useful gap. Without it you know people added to basket and some started checkout, but not whether the rest even looked at their basket. If your theme sends most people straight to checkout from a mini-basket, the event matters less and you can leave it out of your funnel.

Should the view_cart value include VAT and delivery?

Match whatever basis you use for the purchase event, so the figures line up. Most UK shops display prices including VAT, and many send purchase value including VAT, but the important thing is consistency. Delivery is usually unknown at the basket stage, so leave it out of view_cart.

Why do I see more view_cart events than users?

Shoppers often open their basket several times in one visit, for example after each product they add. That is normal. Use users or sessions rather than event counts when you build funnels, so repeat views do not distort the conversion rates between steps.

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.