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

Google Tag Manager integration

Endora Commerce loads your Google Tag Manager container separately on each sales channel and publishes a documented vocabulary of commerce events on the data layer, including B2B-specific ones such as adding a line to a quote request. Tags, triggers and variables are still built in the GTM console.

Who does what: the platform versus the GTM console

Google Tag Manager is a container for tags, not a measurement product, so the scope of the integration is narrow on purpose. The platform does three things: it loads the right container on the right channel’s storefront, pushes a fixed set of commerce events to dataLayer and, if you want it to, delivers those events from the backend to a server container.

It does not mirror your tags, triggers or variables, and it has no say in which vendors your container sends data to. That stays with your marketing team or agency.

Configuration per sales channel

The integration has no admin screen of its own. It consists of six settings in the “Google Tag Manager” group on the general settings screen, each of which can be overridden for a single sales channel: the master switch, the container ID, the consent requirement, the server-side tagging switch, and the server container URL and path. Access is governed by the standard settings read and write permissions, and changes are recorded in the audit log.

A channel is tracked only when the switch is on and the ID has the GTM-XXXXXXX shape. A blank or malformed ID means “not configured” rather than a broken script on the page, so clearing the field is a safe way to pause measurement on one channel. Changes take effect immediately, with no deployment.

On the Google side you need a GTM account and a web container with its ID, plus a running server container if you want server-side tagging.

The data layer event vocabulary

Trigger your tags on the custom events below. The items parameter uses the item shape recommended by GA4 (item_id, item_name, price, quantity) and is passed as a JSON string.

EventWhen
page_viewa page is viewed
view_search_resultssearch results
view_itemproduct page
add_to_cartitem added to the cart
add_to_quote_requestline added to a quote request
add_to_shopping_listitem added to a shopping list
begin_checkoutcheckout started
place_order_clickedthe place-order button is clicked
purchaseorder placed
contact_form_submittedcontact form sent

Payloads carry scalar values only, so a form attachment can never end up in one.

The two things that are easiest to get wrong:

  • Do not use the History Change trigger. The storefront pushes exactly one page_view per destination, including navigations that do not reload the document. The built-in history change trigger would count every navigation a second time.
  • One route to GA4 per channel. A GA4 tag in the container and the native Google Analytics 4 integration enabled on the same channel report the same actions, so metrics double. The platform cannot see inside your container and will not block this: pick one route.

Scroll depth, outbound link clicks, file downloads, element visibility and timers remain the container’s own business. The platform does not publish them because they depend on browser state.

Consent is a single storefront decision, shared with GA4, Meta Ads and LinkedIn Ads: one banner and one stored answer. With the consent requirement on (the default):

  1. Before the container loads, the page sets the Consent Mode v2 defaults to denied for analytics_storage, ad_storage, ad_user_data and ad_personalization.
  2. The container loads anyway. Withholding it would silently disable the tags that never needed consent as well.
  3. The platform sends no events of its own until the visitor accepts.
  4. Accepting mid-session passes a consent update to the container and starts the events flowing, with no page reload.

One important caveat: Consent Mode governs Google tags. A Meta, LinkedIn or custom HTML tag placed in the container fires regardless of the consent state unless you add an extra condition to it in the GTM console. That is the container owner’s responsibility.

Server-side tagging: one route per event

Once server-side tagging is on and a container URL is set, the ten events in the table stop being pushed to dataLayer in the browser and are delivered from the platform’s backend instead. Each event is reported exactly once, never down both paths at the same time, because double-firing quietly inflates purchase counts and revenue in every report downstream. A blank container URL keeps the channel on the browser path even with the switch on.

The storefront hands events to a queue, and a separate process posts them to the container and retries failed attempts: eight times, with increasing delay. The call does not happen inside the buyer’s request, so a slow or unavailable container does not slow the shop down. Exhausted attempts remain visible as failed jobs.

What you need to do on your side:

  • run a server container and add a client in it that claims the configured path (/data by default),
  • rebuild, in the server container, the tags that used to trigger on commerce events in the web container,
  • parse items as JSON and deduplicate on event_id, which is stable across retries,
  • handle a missing IP address and user agent: they are not sent when consent was denied.

The request carries only the event parameters, page context, client ID, consent state and event ID. It contains no e‑mail address, no user or organization ID, no postal address and no hashed identifiers.

What the integration does not cover yet

Serving the gtm.js script from your own domain through the server container, and passing user_id and enhanced conversions in the relay, are not implemented at present. If your container needs them, you add the data on your side.

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.