New in Endora Commerce: a built-in CRM with sales opportunities See it →
Endora Commerce

Google Analytics 4 integration

Google Analytics 4 is configured per sales channel in Endora Commerce: its own measurement ID, Enhanced Ecommerce events wired to the real checkout, and custom events you add in the admin panel.

One GA4 property per channel, or one for everything

GA4 settings have installation-wide defaults and per-channel overrides. A distributor portal and a public storefront can therefore report to different GA4 properties and be switched on independently, and if you prefer a single combined view of traffic, you simply use the same measurement ID in both. A channel with an empty measurement ID sends nothing, even when the integration is enabled.

This matters in B2B, because logged-in buyers ordering against a contract and anonymous visitors arriving from a campaign are two different funnels. What a channel is in the platform is covered in the article on sales channels in one admin.

What reaches GA4

The platform sends one page_view event per navigation, including page transitions that do not reload the browser. With Enhanced Ecommerce switched on, four commerce events are added:

  • view_item on the product page,
  • add_to_cart when an item is added to the cart,
  • begin_checkout on entering checkout,
  • purchase on the order confirmation.

The events fire against the platform’s own order and pricing data, not values scraped from the template. Google’s list of recommended e‑commerce events is longer (for example view_item_list or refund); the module documentation lists these four.

Custom events without a developer

The admin panel has a dedicated GA4 events screen. Each event has a name that follows GA4 naming rules, an action that triggers it, and a chosen subset of fields to pass along. An event can be scoped to one channel or to several.

Trigger actionFields that can be passed
Add to cart, to a quote request or to a shopping listSKU, name, price, quantity
Click on “place order”checkout form fields
Click on a button with a given IDpage context and the button’s data-* attributes
Contact form submissionform fields, without attachments

Adding to a quote request and to a shopping list are signals the standard GA4 set does not have, and in B2B sales they often say more than the cart does. Only the selected fields go to Google, and files never do. Choose form fields with care: Google’s policies prohibit sending personally identifiable information to Analytics. The contact form trigger is for now a prepared hook, because the storefront does not have such a form yet.

Access to the events screen is governed by two permissions: one for viewing and one for editing.

Server-side tagging

This is an option, not the default mode. Once it is on, the Google tag does not load at all and the browser never contacts Google directly. Events go to the storefront’s own address, land in a durable queue, and a separate process forwards them in batches over the Measurement Protocol, with retries. Each event carries a stable identifier, so a retry does not duplicate it.

A few things worth knowing before you switch:

  • The client ID and a 30-minute session are maintained by the platform in its own cookies, and without consent only in the tab’s memory. This lets GA4 keep deriving first visits, session starts and active users.
  • The platform itself reproduces the enhanced measurement the tag normally handles: scroll to 90%, outbound clicks, file downloads, form start and submit, and search results. Video engagement is the exception.
  • The default destination is GA4, but you can point to your own collection URL, for example a Google Tag Manager server container or your own proxy.

GA4 uses the same shared consent as the other analytics and advertising tools, and it can be switched on or off independently of Google Tag Manager, Meta Ads or LinkedIn Ads. When consent is required, the integration starts in Consent Mode v2 with a “denied” state and changes it only after the visitor decides in the banner. In server-side mode that decision is passed along with the event.

What to prepare on the Google side

  1. A GA4 property with a web data stream for every channel you want to measure separately.
  2. A measurement ID in the G-XXXXXXXXXX format. You will find it in GA4 under Admin, in the data stream details (Google’s instructions).
  3. For server-side tagging only: a Measurement Protocol API secret, created in the same data stream.

GA4 directly or through Tag Manager

The direct integration is enough when GA4 is your main measurement tool and you want it running without maintaining a container. If marketing manages many tags and wants to decide for itself what fires and when, Google Tag Manager is the better entry point, and GA4 is then configured inside the container. Independently of both, the platform keeps its own event log with summaries in the admin panel.

GA4 shipped in one of the platform updates, alongside the KSeF and Comarch ERP Optima connectors.

Let’s find out what we can connect at your end

Book a free consultation. We will walk through your ERP, warehouse and sales processes, and show you what the integration path looks like step by step.

Michał Zabielski, founder and CEO of Endora

Michał Zabielski

Founder and CEO, Endora

We reply within one business day.