less than a minute read • Updated 2 hours ago
Analytics Overview
How ecommerce tracking works, what customer events are tracked on the cart and checkout, and how to connect Google Analytics 4 and Google Ads.
You can send ecommerce tracking data to your analytics tools to see how customers move through the cart and checkout. This article explains what is tracked for you, what you connect, and the requirements that apply to every analytics integration.
What gets tracked for you
Ecommerce events on the cart, checkout, and receipt (add to cart, begin checkout, purchase, and more) are tracked automatically and sent to your connected analytics tool. You do not add tracking code to the cart, checkout, or receipt yourself — it is included for you there.
Supported integrations
Google Tag (GA4 and Google Ads) — connect Google Analytics 4, Google Ads, or both. See Set up Google Analytics 4 and Google Ads tracking.
Google Tag Manager — push events into the GTM
dataLayerand build your own tags. See Set up Google Tag Manager for ecommerce tracking.Custom tracking code — add your own snippets when there is no native integration. See Add custom analytics or conversion tracking code.
Requirements
Include
loader.json your own website, on every page. Get it from the admin at Settings > Website & Products, in the "Foxy loader.js" section. Do not add it to the cart, checkout, or receipt.Add your analytics provider's own tag (for example the Google Tag
gtag.js) to every page of your website you want tracked. Do not add it to the cart, checkout, or receipt — it is added there for you.
Notes
Google's older Universal Analytics stopped collecting data in July 2023 and is not supported. Use Google Analytics 4 instead.
If you have customised your cart, checkout, or receipt templates, make sure the custom code placeholders are still present, because tracking is injected through the custom footer placeholder. See the template custom code placeholders reference.