Title: Datalayer Tracking via DATA Reshape for WooCommerce
Author: Eduard Doloc
Published: <strong>11 mai 2026</strong>
Last modified: 17 iunie 2026

---

Caută module

![](https://ps.w.org/datalayer-tracking-datareshape-woocommerce/assets/banner-772x250.
png?rev=3532073)

![](https://ps.w.org/datalayer-tracking-datareshape-woocommerce/assets/icon-256x256.
png?rev=3532095)

# Datalayer Tracking via DATA Reshape for WooCommerce

 De [Eduard Doloc](https://profiles.wordpress.org/rwky/)

[Descarcă](https://downloads.wordpress.org/plugin/datalayer-tracking-datareshape-woocommerce.0.9.1.zip)

 * [Detalii](https://ro.wordpress.org/plugins/datalayer-tracking-datareshape-woocommerce/#description)
 * [Recenzii](https://ro.wordpress.org/plugins/datalayer-tracking-datareshape-woocommerce/#reviews)
 *  [Instalare](https://ro.wordpress.org/plugins/datalayer-tracking-datareshape-woocommerce/#installation)
 * [Dezvoltare](https://ro.wordpress.org/plugins/datalayer-tracking-datareshape-woocommerce/#developers)

 [Suport](https://wordpress.org/support/plugin/datalayer-tracking-datareshape-woocommerce/)

## Descriere

DATA Reshape for WooCommerce is a bridge between your WooCommerce store and the 
DATA Reshape platform. It emits structured ecommerce events (`product_viewed`, `
product_added_to_cart`, `cart_viewed`, `checkout_started`, `checkout_completed`,
plus the mid-funnel checkout steps) into DATA Reshape’s `reshape.push()` queue, 
and DATA Reshape’s loader — served from a tracking subdomain you control — handles
delivery and routing onward to GA4, Meta, TikTok, and every other destination you
have connected.

Because the loader is served first-party, events are not blocked by ad blockers,
ITP, or the usual third-party-script defences that break conventional `gtag`/`fbq`/`
ttq` setups. You do not need to fire those calls in parallel — DATA Reshape routes
a single event to every connected destination with the correct platform-specific
name and field mapping.

This plugin does not replace analytics tools like Google Analytics or Meta Pixel;
it replaces the _fragile transport layer_ underneath them. Event processing, routing,
and deduplication all happen inside DATA Reshape.

An active [DATA Reshape](https://datareshape.ro) plan is required to use this plugin.
All tracking logic, integrations, and event delivery are managed through the DATA
Reshape platform.

#### What’s coming next: API Events

A second tab in the settings UI („API Events”) is reserved for data that _can’t_
flow through the storefront browser at all — admin-recorded phone-call orders, sales
agent activity, and historical customer/order backfill imported into DATA Reshape
via API. This is **not** a CAPI-style server-side mirror of the browser events (
those already get through reliably thanks to the first-party loader); it covers 
genuinely different data sources. Configuration UI is dormant in this version and
will be wired up in a later release.

### Features

#### Core Features

 * Global enable/disable for the integration
 * DATA Reshape library integration
 * Subdomain tracking support
 * Fully compatible with WooCommerce HPOS (High-Performance Order Storage)

#### Events

 * Product Viewed
 * Product Added to Cart (AJAX + POST + GET fallbacks)
 * Product Removed from Cart
 * Cart Viewed
 * Checkout Started
 * Checkout Steps (Billing Address Added, Shipping Detail Added, Payment Method 
   Selected — legacy checkout only)
 * Checkout Completed
 * Consent integration — DATA Reshape natively detects most CMPs (Cookiebot, OneTrust,
   Termly, etc.) and Google Consent Mode v2, with no plugin-side wiring required
 * Single „Grant consent by default” toggle for stores that don’t run a CMP — fires
   DATA Reshape’s native `consent_updated` push at session start so events process
   immediately
 * `drswc_consent_payload` filter for stores that want to drive the consent object
   explicitly from PHP
 * Plain user data in reshape payloads (DATA Reshape hashes server-side)

#### Advanced Tracking

 * Spec-shaped products with `price_base` + `price`; `tax_included` / `tax_percent`
   only when WooCommerce tax is enabled
 * Variations carry `parent_id` / `parent_name` / `parent_sku` / `parent_url`
 * Order-level and product-level coupons emitted in dedicated `coupons[]` arrays
 * Shipping methods and payment methods emitted as structured arrays on Checkout
   Completed
 * Categories emitted as both `category` (primary) and `categories[]` with `name`
   +`id`
 * Stock status, product type, creation timestamp, image, and gallery images

#### Extensibility

 * `drswc_event_payload` — filter the full event envelope before push
 * `drswc_product_payload` — inject GTIN/MPN/EAN, predicted values, custom properties
   per product
 * `drswc_user_payload` — augment user identity (`pre_purchase` or `purchase` source)
 * `drswc_consent_payload` — replace or inject the consent object

#### Reliability Enhancements

 * Handles non-AJAX add-to-cart flows
 * Handles redirect-based add-to-cart (?add-to-cart=)
 * Cache-safe identity hydration — PII never inlined into cacheable HTML
 * Sticky user identity model (loader caches first-seen user, subsequent events 
   inherit)
 * Safe execution timing for low overhead

### Configuration

#### Integration Setup

 * Enable Integration (master switch)
 * Tracking Subdomain (the first-party host serving DATA Reshape’s loader)
 * Library ID
 * Built-in „Check tracking endpoint” health check

#### Events

 * Master switch for browser-delivered events
 * Per-event toggles (so events you handle via custom code can be disabled individually)
 * „Grant consent by default” toggle — off by default (let DATA Reshape auto-detect
   your CMP / Google Consent Mode); on if you don’t run a CMP and want events processed
   immediately

#### API Events

 * Reserved for the upcoming admin-recorded events sync (phone-call orders, etc.)
   and historical customer/order backfill. Not yet active.

## Capturi ecran

[⌊Initial dashboard with general settings (Integration setup tab)⌉⌊Initial dashboard
with general settings (Integration setup tab)⌉[

Initial dashboard with general settings (Integration setup tab)

[⌊Events configuration tab⌉⌊Events configuration tab⌉[

Events configuration tab

## Instalare

 1. Upload the plugin to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ screen in WordPress
 3. Ensure WooCommerce is installed and active
 4. Open the settings from either **WooCommerce  Settings  DATA Reshape** or **Marketing
    DATA Reshape** (the page lives under WooCommerce Settings; the Marketing entry 
    is a shortcut)
 5. Fill in your tracking subdomain and library ID (provided by DATA Reshape), enable
    the integration, and turn on the events you want emitted

## Întrebări frecvente

### Does this plugin support GA4?

Indirectly — events are pushed to DATA Reshape’s `window.reshape` queue, and DATA
Reshape routes them to GA4 and every other connected destination with the correct
platform-specific event name and field mapping. You do not need to fire `gtag`, `
fbq`, or `ttq` calls in parallel.

### Does it work without AJAX add-to-cart?

Yes. It includes fallback mechanisms for redirect-based add-to-cart flows (native
WooCommerce redirect to cart after adding a product).

### Does it support the block-based Cart/Checkout?

The plugin’s core events (Product Viewed, Add to Cart, Cart Viewed, Checkout Started,
Checkout Completed) work on both legacy and block checkouts. The mid-funnel events(
Billing Address Added, Shipping Detail Added, Payment Method Selected) currently
fire on the legacy (shortcode-based) checkout only — block-based checkout support
is planned for a later release.

### Does it support server-side / CAPI-style event mirroring?

No, and it intentionally doesn’t need to. DATA Reshape’s tracking library is served
from a first-party subdomain on your own site, so browser events get through reliably
without being blocked by ad blockers or browser privacy features. The forthcoming„
API Events” tab is for a different purpose: syncing data that doesn’t flow through
the storefront browser at all — admin-recorded phone-call orders and historical 
customer/order backfill.

### Will this slow down my website?

No. The plugin is designed with performance in mind and uses lightweight, conditional
execution; if anything, your setup should see a boost in speed compared to clasic
integrationg (Meta, TikTok and Google).

### Is deduplication handled?

Deduplication is handled by DATA Reshape. The plugin focuses on exposing accurate
and complete data for DATA Reshape to pickup and process onward.

## Recenzii

Nu există nicio verificare pentru acest modul.

## Contributori și dezvoltatori

„Datalayer Tracking via DATA Reshape for WooCommerce” este un software open-source.
La acest modul au contribuit următoarele persoane.

Contributori

 *   [ Eduard Doloc ](https://profiles.wordpress.org/rwky/)

[Tradu „Datalayer Tracking via DATA Reshape for WooCommerce” în limba ta.](https://translate.wordpress.org/projects/wp-plugins/datalayer-tracking-datareshape-woocommerce)

### Te interesează dezvoltarea?

[Răsfoiește codul](https://plugins.trac.wordpress.org/browser/datalayer-tracking-datareshape-woocommerce/),
vezi [depozitarul SVN](https://plugins.svn.wordpress.org/datalayer-tracking-datareshape-woocommerce/),
sau abonează-te la [jurnalul de dezvoltare](https://plugins.trac.wordpress.org/log/datalayer-tracking-datareshape-woocommerce/)
prin [RSS](https://plugins.trac.wordpress.org/log/datalayer-tracking-datareshape-woocommerce/?limit=100&mode=stop_on_copy&format=rss).

## Istoric modificări

#### 0.9.1

 * Fix: Add-to-cart now tracks reliably on stores where another plugin or theme 
   intercepts the product-page button click before the standard handlers can run(
   volume-discount widgets, bundle plugins, one-click upsells, and similar).
 * Fix: Add-to-cart no longer silently drops when `/wp-admin/admin-ajax.php` is 
   unreachable (security-plugin allow-lists, expired nonces, ad-blocker rules, network
   drops). The product-page event payload now ships pre-built with the page, so 
   the push happens synchronously.

#### 0.9

 * Fix: Add-to-cart now tracks reliably on themes that hijack the single-product
   form with their own AJAX (Woodmart, custom builders, etc.). A new product-page
   click handler on the standard `.single_add_to_cart_button` fires the event before
   the theme’s submit logic runs, regardless of which AJAX library or endpoint the
   theme uses. Built-in 3-second JS dedup prevents double-fire when both this path
   and the legacy AJAX-listener path would trigger.
 * Fix: Listing add-to-cart with WooCommerce’s „Redirect to cart page after successful
   addition” option enabled — the `?add-to-cart=` link redirected to the cart page
   before any client-side hook could fire, so the event was lost. A new server-side`
   woocommerce_add_to_cart` action hook now stashes the pending event in session
   so it emits on the cart page after the redirect.
 * Fix: Variable products on classic (non-AJAX) single-product pages now emit the
   chosen variation as `products[0].id` instead of the parent product id. The POST
   capture path was previously ignoring `variation_id`.
 * Internal: the new server-side hook is intentionally gated on non-AJAX, non-REST,
   non-admin contexts so AJAX flows (already covered client-side) don’t double-fire.

#### 0.8

 * Consent integration overhauled. The legacy „Google Consent Mode granted by default”
   toggle (emitted a `gtag('consent', 'update', ...)` block) and the per-event envelope`
   consent_default_grant` toggle have both been removed. A single new „Grant consent
   by default” toggle now fires DATA Reshape’s native `consent_updated` push at 
   session start — DATA Reshape detects most CMPs and Google Consent Mode v2 on 
   its own, so this toggle defaults to OFF.
 * Tax fields (`tax_included`, `tax_percent`) are now omitted entirely from product,
   coupon, and shipping payloads when WooCommerce tax is disabled (previously emitted
   as `tax_included: false`).
 * Settings tabs renamed for clarity: „Browser events”  „Events”, „Server-side events”„
   API Events”. The API Events tab is reserved for admin-recorded events (e.g. phone-
   call orders) and historical customer/order backfill — not a CAPI-style server-
   side mirror of browser events.
 * Settings also reachable under Marketing  DATA Reshape (shortcut to the canonical
   WooCommerce  Settings  DATA Reshape page).
 * Field labels simplified: „Server-side API endpoint” / „Server-side API key”  „
   API endpoint” / „API key”.
 * Internal: narrative inline comments moved to CLAUDE.md; no functional impact.

#### 0.7

 * Hard cutover from `window.dataLayer` to DATA Reshape’s `window.reshape` API. 
   Event names updated to the new spec (product_viewed, product_added_to_cart, cart_viewed,
   checkout_started, checkout_completed, etc.).
 * Mid-funnel checkout events on legacy checkout: billing_address_added, shipping_detail_added,
   payment_method_selected.
 * „Grant consent by default” and „Track checkout steps” toggles added.
 * Identity emission tightened — `user` object sent only when logged in or in checkout
   with confirmed contact data.
 * Variations carry parent_* fields; products emit categories[], stock status, type,
   created_at, image, gallery.
 * Pricing decoupled from coupons — `price` / `price_base` are the buyer-visible
   regular / sale prices; coupons land in dedicated `coupons[]` arrays.
 * New filters: `drswc_event_payload`, `drswc_product_payload`, `drswc_user_payload`,`
   drswc_consent_payload`.

#### 0.6

 * PII cache leak fix extended to cart/checkout pages (in addition to thankyou).
 * HPOS and Cart/Checkout Blocks compatibility declared.

#### 0.5

 * Fixed PII leak on page-cached thankyou pages (LiteSpeed et al.) — identity now
   hydrated client-side from cookies.
 * Removed browser-side SHA256 hashing — DATA Reshape hashes server-side.
 * On-save tracking endpoint health check plus on-demand re-check button.
 * wp.org update-available pill in the settings header.
 * Loader URL tags the installed plugin version (`&wp=`).

#### 0.4

 * Fresh-install checkbox defaults flipped to off.
 * Admin warning notice when the plugin is active but not configured.

#### 0.3

 * AJAX add-to-cart detection works with third-party plugins (QuadLayers etc.) and
   themes whose buttons don’t expose `data-product_id`.
 * Removed the in-page dataLayer debug overlay.

#### 0.1

 * Initial release.

## Meta

 *  Versiunea **0.9.1**
 *  Ultima actualizare **Acum 4 zile**
 *  Instalări active: **Mai puțin de 10**
 *  Versiune WordPress ** 6.0 sau mai recentă **
 *  Testat până la **6.9.4**
 *  Versiune PHP ** 7.4 sau mai recentă **
 *  Limbă
 * [English (US)](https://wordpress.org/plugins/datalayer-tracking-datareshape-woocommerce/)
 * Etichetă
 * [WooCommerce Tracking](https://ro.wordpress.org/plugins/tags/woocommerce-tracking/)
 *  [Vizualizare avansată](https://ro.wordpress.org/plugins/datalayer-tracking-datareshape-woocommerce/advanced/)

## Evaluări

Nu a fost trimisă nicio recenzie până acum.

[Your review](https://wordpress.org/support/plugin/datalayer-tracking-datareshape-woocommerce/reviews/#new-post)

[Vezi toate recenziile](https://wordpress.org/support/plugin/datalayer-tracking-datareshape-woocommerce/reviews/)

## Contributori

 *   [ Eduard Doloc ](https://profiles.wordpress.org/rwky/)

## Suport

Ai ceva de zis? Ai nevoie de ajutor?

 [Vezi forumul pentru suport](https://wordpress.org/support/plugin/datalayer-tracking-datareshape-woocommerce/)

## Donează

Vrei să sprijini dezvoltarea acestui modul?

 [ Donează pentru acest modul ](https://www.paypal.me/eduardvd)