Skip to content

Ecommerce Tracking Pro

Add-on ID: kv_ga4_ecommerce · Edition: CS-Cart & Multi-Vendor · Latest version: 1.1.1 · Compatible with: CS-Cart & Multi-Vendor 4.17.2 – 4.21.x, PHP 7.4 – 8.3 · Changelog: view

Ecommerce Tracking Pro for Google Analytics 4 & Tag Manager

The add-on sends the complete set of recommended ecommerce events to Google Analytics 4. Events go out through gtag.js or through the Google Tag Manager dataLayer, in the official GA4 ecommerce format: from product list impressions to purchases and refunds. It works with CS-Cart’s AJAX add to cart, quick view and AJAX product lists. It respects Consent Mode v2 and plugs into the cookie consent dialog of the core GDPR add-on. If an ad blocker or an off-site payment page stops the browser from reporting a purchase, a server-side Measurement Protocol fallback sends it, and every order is reported only once.

  • All GA4 ecommerce events: view_item_list, select_item, view_item, add_to_cart, remove_from_cart, view_cart, begin_checkout, add_shipping_info, add_payment_info, purchase, refund, plus search, login, sign_up and add_to_wishlist.
  • Two delivery modes: gtag.js with your measurement ID, or a GTM container with clean dataLayer pushes ({ecommerce: null} before every ecommerce event).
  • AJAX-aware: add to cart from product pages, lists and quick view, quantity changes and removals in the cart and mini-cart are detected on the server. The events arrive with the AJAX response, without a page reload.
  • Rich item data: item_id as SKU or product ID, item_name, item_brand from a product feature, item_category to item_category5 from the main category path, item_variant from variation features and options, price, discount, quantity, index, list name and ID. In Multi-Vendor, affiliation is the vendor name.
  • Purchase once: the purchase is printed on the order landing page only the first time. The browser confirms delivery to the server, and orders that were never confirmed are sent through the Measurement Protocol with the same transaction_id after a delay you choose.
  • Refunds through the Measurement Protocol when an order moves to a status you select.
  • Consent Mode v2: region-specific defaults (strict for the EEA, UK and Switzerland out of the box), Advanced or Basic mode, wait_for_update, ads_data_redaction and url_passthrough. Choices made in the GDPR add-on’s cookie dialog are applied automatically.
  • Per-storefront settings (CS-Cart Ultimate storefronts and Multi-Vendor storefronts).
  • Clean data: administrators and vendors browsing the storefront are not tracked, a debug mode feeds GA4 DebugView, and Measurement Protocol validation is logged.
CS-Cart / Multi-Vendor 4.17.2 – 4.21.x (tested on CS-Cart 4.17.2, Multi-Vendor 4.17.2 and Multi-Vendor 4.21.2)
PHP 7.2.5 – 8.3 (the code is PHP 7.4-compatible; tested with PHP 8.1 and 8.3)
Themes Responsive and Bright theme, plus child themes based on Responsive
Optional GDPR add-on (cookie consent), Product variations, Wishlist

The page head gets the Consent Mode defaults, the Google tag (or GTM container) and the events of the current page, such as the product list or the product viewed. Cart and wishlist changes are detected on the server. The add-on compares the session cart at the start and at the end of each request, queues the matching events in the session, and delivers them with the next page or AJAX response. A small storefront script sends every event through gtag or the dataLayer and fires select_item when a listed product is clicked. It also confirms delivered purchases to the server and turns cookie-consent choices into Consent Mode updates. A table stores one row per order, with the GA client ID, the session ID and the consent state. It is used for purchase de-duplication, the Measurement Protocol fallback and refunds.

Google Analytics and Google Tag Manager are trademarks of Google LLC. This add-on is not endorsed by Google. “for Google Analytics 4” describes compatibility only.