Analytics and Tracking

add_to_cart

Also called add to cart event, add to basket

The GA4 ecommerce event that records a product being added to the shopper's basket, with its price and quantity.

Quick facts: add_to_cart

Category
Analytics and Tracking
Also called
add to cart event, add to basket
Level
Beginner
Affects
Product page analysis, basket abandonment reporting, remarketing audiences, ad optimisation
Where to see it
GA4 ecommerce purchases report, GA4 DebugView, Google Tag Manager, Meta Events Manager
In this article4
  1. How add_to_cart works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

add_to_cart is the Google Analytics 4 event that records a shopper putting a product into their basket. GA4 uses the American word “cart” in its event names, but it is the same action UK shops call adding to basket, and it is the first point at which browsing turns into an intention to buy.

How add_to_cart works

add_to_cart is a recommended event: Google defines the name and parameters, and your site has to send it. Most shop platforms do this through their GA4 integration; custom sites usually push the details into the data layer and let Google Tag Manager pass them on.

The event should carry three things:

  • items The product added, with its ID, name, variant, price and quantity. If someone adds three of the same mug, the quantity is 3, not three separate events.
  • value The price multiplied by the quantity added.
  • currency “GBP”.

It should fire when the product actually lands in the basket. On many sites the add button triggers a background request that can fail, for instance when a size is out of stock. Firing on the button click rather than on a successful add overstates the count.

GA4 turns these events into metrics such as add-to-carts and items added to cart, which appear in the ecommerce purchases report next to items viewed and items purchased. Meta’s pixel has its own equivalent, AddToCart, and many shops send both from the same trigger.

Why it matters

The basket is the clearest signal of buying intent you get before money changes hands. Comparing it with product views gives you a view-to-basket rate for every product; comparing it with purchases gives you a basket-to-buy rate. Those two numbers tell you different things.

A low view-to-basket rate points at the product page: price, photos, delivery information, stock or reviews. A healthy rate that collapses before purchase points at the basket and checkout instead, or at a shipping charge that appears too late. Without add_to_cart you cannot tell these problems apart, and you end up redesigning the wrong page.

It also feeds advertising. Basket additions are used for remarketing audiences, such as people who added something in the last seven days but did not buy. For a newer shop with few sales, ad platforms sometimes optimise towards add-to-basket as a stepping stone, though I would move to purchases as soon as there is enough volume, because baskets are cheap to win and do not pay the bills.

Common mistakes

  • Counting button clicks instead of successful additions, inflating the figure.
  • Missing quick-add buttons on category pages, search results or “you may also like” carousels, so a large share of additions goes unrecorded.
  • Value set to the unit price when the shopper added more than one.
  • Item IDs that do not match the IDs used in view_item and purchase, or the IDs in your product feed, which breaks product-level analysis and dynamic ads.
  • Treating add-to-basket as a sale in reports to directors. It is a step, not an outcome.

How to act on it

Test every route into the basket: the main button on the product page, quick-add on listings, upsells in the basket itself and any wishlist “move to basket” option. Watch each one in GA4 DebugView and confirm one event per action, with the right quantity and a value in GBP.

Next, pair it with remove_from_cart so you can see net basket behaviour, and add it as a step in a funnel exploration from view_item to purchase. Look at the products with plenty of views and few basket additions first; they are usually the quickest wins.

If you advertise on Facebook and Instagram, the same event shapes audiences and optimisation, which is why I check it early when running Facebook and Instagram ads for online shops.

Do and do not

Do

  • Fire on a successful addition, not the button click
  • Track quick-add buttons on listings and carousels
  • Keep item IDs identical to your product feed

Do not

  • Report basket additions as sales
  • Send one event per unit when the shopper adds several
  • Send the event twice from a plugin and a tag

Questions people ask about this

Why does GA4 show more add-to-carts than my shop platform?

Usually the GA4 event fires on the button click rather than on a successful addition, or it fires twice because both a plugin and a Tag Manager tag send it. Some difference is expected, since platforms count baskets differently and visitors who decline analytics cookies are missing from GA4. If the gap changes suddenly, or GA4 shows more than the platform, test the event in DebugView.

Should I optimise ads for add-to-cart or purchases?

Purchases, whenever you have enough of them. Ad platforms find people who add to basket far more easily than people who pay, so optimising for baskets can fill the funnel with browsers. Add-to-basket can be a temporary goal for a new shop with very few sales, but plan to switch.

Do I need add_to_cart if I already track purchases?

Purchases tell you what sold; add_to_cart tells you where people dropped out before that. Without it you cannot separate a product page problem from a checkout problem. It also powers remarketing audiences built around abandoned baskets.

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.