Commerce events: auto or manual
Ta treść nie jest jeszcze dostępna w Twoim języku.
Commerce events are things like “viewed a product”, “added to cart”, “started checkout” and “placed an order”. The funnel is built from them. The commerce option of init sets where they come from:
auto (the default) |
manual |
|
|---|---|---|
| Where events come from | Detected: your GA4 dataLayer, page types, add-to-cart buttons and requests, your own rules |
Only your qm.commerce calls |
qm.commerce calls |
Ignored | Sent, exactly as written |
| Code needed | None | One call per event |
| Best for | Shops that already send GA4 e-commerce events, and shops on WooCommerce, PrestaShop or Shopify | Custom shops that want full control and exact data |
qm("init", { key: "pk_live_…" }); // autoqm("init", { key: "pk_live_…", commerce: "manual" }); // manualThings to know
Section titled “Things to know”- Only your code sets the mode. Install & setup shows which mode your pages use, and warns if it changed in the last 7 days.
- Custom events and everything recorded automatically work in both modes.
automode cannot see everything: no payment redirect, payment return or rejected coupon. See Auto mode.- A buyer who closes the tab on the payment page never reaches your confirmation page, so no order is sent in either mode.
Which one should I pick?
Section titled “Which one should I pick?”- Your shop pushes GA4 e-commerce events? Use
auto. You are done. - WooCommerce, PrestaShop or Shopify without GA4 e-commerce? Start with
autoand add your own rules for what is missing. - You build the shop yourself and can add a line of code per event? Use
manualfor full product, cart and order data.