A WordPress and WooCommerce data layer built for accurate tracking
I build a structured DataLayer 2.0 framework for WordPress and WooCommerce: page_view and every e-commerce step push complete, consistent data with live values, ready for GA4, Google Ads, Meta and any other platform through GTM.
- DataLayer 2.0 framework
- page_view with context
- Every e-commerce step
- Ready for every platform
Why plugin data layers fall short
Many WordPress sites rely on a mix of plugins for tracking. Each one sends slightly different data, some steps are missing, and nothing is documented.
- Purchases that fire twice on thank-you page reloads.
- Prices sent as text, or without tax, shipping and discounts.
- Checkout steps (shipping, payment) not tracked at all.
- Logged-in user and page context missing, so segmentation is impossible.
The DataLayer 2.0 framework
One structured, documented data layer that every tag reads from, instead of each plugin guessing.
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'add_to_cart',
ecommerce: {
currency: 'USD',
value: 59.00,
items: [{
item_id: 'SKU-123',
item_name: 'Running Shoe',
item_category: 'Shoes',
price: 59.00,
quantity: 1
}]
}
}); Consistent structure
Every event follows the same GA4-compatible format, so one set of GTM variables works for all platforms.
Live values
Prices, quantities, coupons and totals come from WooCommerce at the moment of the action.
Safe by default
The ecommerce object is cleared between pushes and purchases fire once per order.
WordPress e-commerce tracking: every step with live values
Each event pushes the full GA4-compatible ecommerce object with item IDs, names, categories, variants, prices, quantities, coupon, currency and value, cleared between pushes to avoid stale data.
- 01
page_viewPage view page type, user state - 02
view_itemProduct view item ID, name, price - 03
add_to_cartAdd to cart item, quantity, value - 04
begin_checkoutCheckout start cart items, value - 05
add_shipping_infoShipping step shipping tier, value - 06
add_payment_infoPayment step payment type, value - 07
purchasePurchase order ID, revenue, tax
Values are injected dynamically from the page and checkout, so totals match your real orders. Event names above follow GA4 conventions as a reference; the final names and required properties always follow each destination platform's own specification.
What you get
- DataLayer 2.0 specification for your site
- page_view with page type, user state and content context
- view_item, add_to_cart, begin_checkout, add_shipping_info, add_payment_info and purchase with dynamic values
- Duplicate purchase protection with transaction IDs
- GTM variables and triggers ready for every platform
- Developer documentation, plus a QA report
How we work together
- 01Audit
I review your current WordPress setup, tags, forms and data flows, and list what is missing or wrong.
- 02Plan
You get a written tracking plan: events, values, identity and where each signal goes.
- 03Build
I implement the plan on your site, server and integrations, without breaking existing tracking.
- 04Verify
Every event is tested with real actions and compared with your store or CRM, then documented.
My Proven 5-Step Working Process
A clear, tested process, so you know exactly what is being tracked, why, and that it works. Nothing goes live until it is tested against real conversions.
-
Step 1: Free discovery call
Free · 30 minWe agree what counts as a real lead or sale for your business, which platforms you use and where the numbers stop adding up.
-
Step 2: Tracking audit & measurement plan
Step 1I audit your tags, GTM container, GA4, ad platform conversions and CRM, then write a tracking plan for you to approve before anything changes.
-
Step 3: Build & connect
ImplementationGA4, Google Tag Manager, server-side tracking, Meta CAPI, enhanced conversions and CRM or offline imports are built and connected end to end.
-
Step 4: Test & verify
Before go-liveEvery event is checked in GTM Preview, GA4 DebugView and each ad platform's diagnostics, with deduplication and consent tested properly.
-
Step 5: Handover & support
Docs + videoYou get written documentation and a walkthrough video, and I stay on hand after launch to make sure the data keeps matching.
WordPress questions
Do you build it as a plugin or theme code?
Usually as a small custom plugin or code snippets, so it survives theme updates and doesn't depend on third-party tracking plugins.
Does it work with WooCommerce block checkout?
Yes. Block-based and classic checkouts are handled, including the shipping and payment steps.
What about Shopify?
Shopify needs a different approach through its Customer Events. See the e-commerce data layer service for Shopify.
Often combined with
Let's get your WordPress tracking right
Tell me what you're tracking today and where the numbers don't add up. You'll get an honest assessment and a clear plan.