How to Track Add to Cart and View Content in Shopify
Upper funnel events drive your audiences and your optimization. Here is how to capture them in Shopify without duplicates or missing product data.

Purchase tracking gets all the attention, and fair enough, that is the money. But add to cart and product view are what your audiences and your optimization are built on.
Get them wrong and Meta is retargeting people who never looked at anything, while Google is guessing about intent it cannot see.
What these events are for
Be clear about why you want them, because it changes how you set them up.
Retargeting audiences. Viewed a product, added to cart, did not buy. These are your highest value audiences.
Optimization signal. Upper funnel events give the algorithms something to learn from before you have enough purchases.
Funnel diagnosis. If a thousand people view a product and four add to cart, that is a product page problem, not an ads problem.
What they are not for is being your primary conversion. Optimize for add to cart and you will get a great deal of add to carts from people who never intended to buy.
Where they fire on Shopify
Product view is on the storefront, so GTM handles it. Add to cart is trickier, because carts behave differently across themes.
Standard themes reload or navigate on add to cart, which is easy to catch.
Ajax carts and slide out drawers do not navigate at all. A page based trigger will never fire.
Quick add buttons on collection pages are often missed entirely, and on many stores that is where most adds happen.
This is why so many stores have add to cart numbers far below reality. The tracking only catches one of the three paths.
The reliable way to catch add to cart
Two options, in order of preference.
Option one, use the Shopify Custom Pixel event
Shopify emits product_added_to_cart regardless of how the theme handles it. Drawer, quick add, standard page, it fires. That is exactly what you want, and it comes with proper product data attached.
This is the most reliable route and it is the one I use on most stores. Setup is covered in
the Shopify Custom Pixel guide.
Option two, a data layer push in the theme
If you need something the Shopify event does not carry, have your developer push an event to the data layer when the cart updates, then trigger from that.
What you want to avoid is the third option people reach for first: a click trigger on the add to cart button. It breaks the moment a theme update renames a class, and it fires even when the add fails.
Image: diagram showing three add to cart paths (product page, drawer, quick add) all converging on one tracked event.
Send the product data, not just the event
An add to cart event with no product attached is nearly useless. You cannot build a dynamic retargeting audience from it and you cannot diagnose anything.
Include:
Product ID, matching whatever ID your product feed uses. This is the one people get wrong, and it breaks dynamic ads.
Product name
Price and currency
Quantity
Variant, if variants matter to your catalog.
That product ID point deserves emphasis. If your feed uses one ID format and your tracking sends another, dynamic retargeting shows people the wrong products or nothing at all. Check that they match before you trust the audience.
Product view, and the mistake with collections
Product view should fire on product detail pages only.
A surprising number of setups fire it on collection pages too, on the theory that the customer saw the products. Now your view content numbers are enormous, your audiences are full of browsers, and your funnel math is meaningless.
Collection views are worth tracking as their own event if you want them. Do not blend them together.
Testing it
Add a product from a normal product page. Confirm one event with the right product.
Add from the quick add button on a collection page. Confirm it fires too.
Add from the cart drawer if your theme has one.
Add the same product twice and confirm you get two events, not one.
Compare a day of add to cart events against your Shopify analytics. Wildly lower means you are missing a path.
That first comparison catches more problems than any amount of tag inspection.
Need this built properly?
If your add to cart numbers look suspiciously low and your retargeting audiences are not filling up, you are probably missing one of those paths. I set up and repair tracking for ecommerce stores and lead generation businesses, so the numbers in your ad accounts match the money in your bank account.
Have a look at what I do, or book a call and we can go through your setup together.



















