Skip to content

Auto mode

auto is the default commerce mode. Quomerce detects commerce events from three sources. Detection loads in idle time, as a separate small file, so it never slows the page.

If your shop sends GA4 e-commerce events through gtag() or Google Tag Manager, Quomerce reads them from the dataLayer. Events pushed before the script loaded are read too.

GA4 event Quomerce event Data taken
view_item Product viewed The first item
add_to_cart / remove_from_cart Added to / removed from cart Each item, with its quantity
view_cart Cart viewed Items, value, currency
begin_checkout Checkout started Items, value, currency
add_shipping_info Shipping method chosen shipping_tier
add_payment_info Payment method chosen payment_type
purchase Order placed transaction_id, value, currency, items
search / view_search_results Search search_term (emails and phone numbers masked)
view_item_list / select_item Product list viewed / product picked List id and name, item count, index
add_to_wishlist Added to wishlist The first item
view_promotion / select_promotion Promotion viewed / clicked Promotion id, name, creative, slot
sign_up / login Signed up / logged in method

A coupon on begin_checkout, add_shipping_info, add_payment_info or purchase is recorded as an accepted coupon, once per session.

If your setup pushes to an array with another name, set dataLayer name in Analytics settings.

These work on most shops with no setup:

  • Page types. A category page counts as a product list viewed, a search page as a search, a cart page as cart viewed, a checkout page as checkout started, and a thank-you page as an order placed. Pages get their type from your page type rules or from the URL.
  • Add-to-cart buttons. Buttons whose text says “add to cart” in Polish, English, German, Czech or Slovak (“Dodaj do koszyka”, “Add to basket”, “In den Warenkorb”…), and the standard add-to-cart markup of WooCommerce and PrestaShop themes. A link never counts: “Go to cart” opens the cart, it adds nothing.
  • Add-to-cart requests to Shopify (/cart/add.js), WooCommerce (wc-ajax=add_to_cart, the Store API) and PrestaShop.

On a page with exactly one product, a detected add to cart is linked to that product.

You can turn the built-in button and request rules off with Built-in rules in Analytics settings. Page types always apply.

In Analytics settings → Commerce events → Your rules, add up to 50 rules. Each rule says: when this click or this successful request happens, this event happened.

Event Example rule
Added to cart Click, CSS selector .add-to-cart
Removed from cart Click, button text Remove
Started checkout Request, path starts with /api/checkout
Chose payment Click, CSS selector [data-payment-method]
Went to payment Request, path matches ^/api/pay/

Request rules can also require a method (GET, POST…). A rule reports each event type at most once per page load.

A detected event waits up to 1 second for other reports of the same action. Then it is sent once, from the most trusted source: platform, then dataLayer, then rules. Events for different products are never merged. Leaving the page inside that second sends what is waiting.