2 min readAug 10, 2026by jakub

Data Layer

Every GA4 tag needs a data layer, and in most Magento stores that data layer is hard-coded in a theme template. Change what you track and you are editing PHTML, deploying, and hoping the JSON still parses. Qoliber Data Layer replaces that with templates you edit in the admin — and adds a server-side path so conversions still arrive when the browser never reports them.

Latest version: 1.0.0 — changelog

Why it matters

  • Ad-blockers and ITP stop costing you conversions. purchase is sent from the server at order placement, so a shopper who pays and closes the tab is still counted.
  • Change tracking without a deployment. Each event is a JSON template edited in the admin, scoped per store view.
  • Consent handled properly. Google Consent Mode v2 defaults are emitted before GTM loads, and server-side transmission honours the consent captured at event time — not whatever the shopper clicked later.
  • One event, several destinations. GA4, Meta and TikTok receive the same event, so the numbers agree.
  • No double counting where it can be avoided. A shared event_id lets Meta and TikTok collapse the browser and server copies of a conversion into one.

What you get

  • 14 GA4 ecommerce events installed ready to use: view_item, view_item_list, add_to_cart, remove_from_cart, view_cart, begin_checkout, add_shipping_info, add_payment_info, purchase, refund, add_to_wishlist, login, sign_up, search.
  • A template editor with variable insertion, validation and preview.
  • Server-side transmission to GA4 Measurement Protocol, Meta Conversions API, TikTok Events API, and GTM Server-Side via an endpoint override.
  • First-touch attribution capturegclid, gbraid, wbraid, fbclid, msclkid, ttclid and utm_* stored against the order.
  • A dispatch log recording every server-side delivery attempt, with configurable retention.
  • Four CLI commands for rendering, validation and destination testing.

The Data Layer configuration section in Stores > Configuration

Supported versions

PHP8.1 – 8.5
Magento / Mage-OSmagento/framework ^103.0.7 (Magento 2.4.6+, Mage-OS equivalents)

Next steps

Data Layer — Marketing — Extensions | qoliber Docs