Why ecommerce tracking changes your decisions
“Google Analytics 4” is searched 5,400 times a month in France. Installed without the ecommerce events, GA4 counts visits; with them, it shows at which step your visitors drop out, which products are viewed without being added to the cart, and which traffic sources actually drive sales.
On our own selling sites, we set up the same events everywhere (add_to_cart, begin_checkout, purchase) with a consent banner: 31 sites send ecommerce events today. That is what lets us compare journeys from one site to another.
The ecommerce events recommended by Google
Google Analytics documents a list of recommended ecommerce events. Use exactly these names and their parameters: they are what the GA4 ecommerce reports rely on.
- view_item_list
- select_item
- view_item
- add_to_wishlist
- add_to_cart
- remove_from_cart
- view_cart
- begin_checkout
- add_shipping_info
- add_payment_info
- purchase
- refund
- view_promotion
- select_promotion
Each event carries an items array describing the products involved (ID, name, price, quantity, category). Google specifies that this array can include up to 200 items.
The useful minimum for a small shop
There is no need to set everything up on day one. Four events are enough to read most of the journey:
- view_item: on every product page, with the product’s ID, name and price.
- add_to_cart: on the click on “Add to cart”, with the product and the quantity.
- begin_checkout: when the visitor heads to payment. In a one-click journey, it is the click on the buy button.
- purchase: on the confirmation page, with transaction_id, value, currency and the products bought.
Setting up tracking: three routes
- Your platform does it: Shopify, PrestaShop, WooCommerce and most solutions offer a GA4 integration that sends ecommerce events. Check which ones are actually sent, purchase in particular.
- Google Tag Manager: you fire each event from the data layer (dataLayer) your site fills in. The most flexible route, and the easiest to check.
- Direct code (gtag.js): a few lines on each page concerned. Suited to a static or custom-built site.
- Check in real time: GA4’s DebugView report shows every event received, with its parameters.
- Place a real test order: check that purchase arrives only once, with the right value and the right currency.
- Mark purchase as a key event: it then becomes a conversion you can use in reports and in Google Ads.
Consent: Google’s consent mode and the CNIL rules
Google Analytics sets trackers: in France, the visitor’s consent is in principle required before measuring. Two sets of rules frame the practice.
On Google’s side, consent mode passes the visitor’s choice on to your tags. Updated in November 2023, it includes the parameters ad_storage, analytics_storage, ad_user_data, ad_personalization. Google says it can be implemented in basic mode (tags only load after consent) or advanced mode (they load and adapt their behaviour to the choice made).
On the CNIL’s side, some audience measurement can be exempted from consent, under article 82 of the French Data Protection Act (loi Informatique et Libertés), on strict conditions: it must serve only to produce anonymous statistics, and tracker lifetime and data retention must be limited. The CNIL specifies that offers whose provider reuses the data for its own purposes do not qualify for the exemption.
- Tracker lifetime: 13 months at most, according to the CNIL.
- Retention of the information collected: 25 months at most.
- Purpose: anonymous statistics only, with no cross-referencing with other processing.
In practice, a standard Google Analytics setup requires a compliant consent banner. A consequence worth knowing: your reports only count visitors who accept. On our own sites, the measured sample is much smaller than the real traffic; real sales are read in the payment tool, while GA4 gives the proportions and the journey.
The reports to read once tracking is in place
- Monetisation, ecommerce purchases: products viewed, added to cart and bought. A product that is viewed a lot and rarely added calls for a rewritten product page.
- Funnel exploration: view_item, add_to_cart, begin_checkout, purchase. The step with the steepest drop is the one to tackle first.
- Traffic acquisition: conversions by source. Compare Google, Bing, AI assistants and advertising.
- Device: mobile versus desktop. A much lower mobile conversion signals a mobile journey to simplify.
Frequently asked questions
Which GA4 events does an online shop need?
At least view_item, add_to_cart, begin_checkout and purchase. Google documents a full list of recommended ecommerce events, including view_item_list, view_cart, add_payment_info and refund.
Why do my GA4 sales not match my real sales?
Most often because GA4 only counts visitors who accept measurement, because the purchase event is not sent on every payment path, or because it is sent twice without a transaction_id.
Is Google Analytics 4 exempt from consent in France?
Not in its standard configuration. The CNIL only exempts audience measurement limited to anonymous statistics, with limited durations and no reuse of the data by the provider.
Do I need Google Tag Manager?
No, but it makes it easier to check events and to make changes without touching the code. On a simple site, a few lines of gtag.js are enough.