All posts
5 min readbigcommerce, ga4, ecommerce

BigCommerce tracking: GA4, Meta, and Google Ads without the data-layer gaps

BigCommerce has decent native tracking hooks, but the data layer has gaps that silently drop purchase values and item details. Here's how to wire GA4 and ad pixels so the ecommerce data is actually complete.


BigCommerce gives you more tracking control than most hosted carts — script management with page-level targeting, a real checkout you can instrument, and native GA4 support — but its data layer is not GA4-shaped out of the box. The gaps that cost money are the mid-funnel events and the purchase value, and both are fixable with a single GTM container plus a small amount of deliberate work on the order-confirmation page.

What BigCommerce gives you natively

Script Manager is the good part. You can add scripts, choose whether they load on all pages, checkout, or the order-confirmation page, and control head versus footer placement. Compared with platforms where custom code lands wherever the platform decides, this is a genuine advantage — you can put a GTM container in head on all pages and a purchase snippet on the order-confirmation page only.

Native GA4 support exists in the analytics settings and will get pageviews and basic ecommerce flowing quickly. It is also the most common source of duplicate tracking: enable it and add your own GA4 tag through GTM and you get two properties' worth of hits.

Checkout is instrumentable on most plans, which is the meaningful difference from Shopify's sandboxed model — you can generally run your own scripts through checkout rather than only through a constrained pixel API.

Where the gaps actually are

The data layer is not GA4's data layer

BigCommerce exposes storefront data — through Stencil template context and its storefront APIs — but not as GA4's recommended ecommerce events with a compliant items array. So a GTM tag listening for add_to_cart hears nothing until you push it.

The three events worth building first, in order of value:

  1. purchase, on the order-confirmation page, with the real order total and transaction ID.
  2. add_to_cart, on the AJAX add — not on cart page load.
  3. view_item, on the product page.

begin_checkout and view_cart follow once those are stable.

The purchase value needs deciding, then locking

Order totals on BigCommerce can include or exclude tax and shipping depending on your configuration and market. Decide once what value means, document it, and never change it silently — a redefinition mid-year makes every year-over-year comparison meaningless.

Match transaction_id to the BigCommerce order ID so refunds can be reconciled later, and so duplicates are detectable.

The order-confirmation page can be re-rendered

As on most carts, the confirmation page can be reloaded. Guard the purchase emit — a session-storage check on the transaction ID at minimum, ideally a server-side flag. Do not rely on platform deduplication alone.

The recommended architecture

One container, one source of truth:

LayerWhat goes there
Script Manager, all pages, headdataLayer init + GTM container
Stencil templatesdataLayer pushes for view_item, add_to_cart, view_cart
Script Manager, order confirmationpurchase push with order data
GTM containerGA4, Google Ads, Meta, TikTok tags + consent gating
BigCommerce native GA4Off, if GTM handles GA4

The dataLayer initialisation must come before the container, in the same head script:

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'view_item',
  ecommerce: {
    currency: 'USD',
    value: 79.00,
    items: [{
      item_id: 'BC-4471',
      item_name: 'Trail Runner',
      item_brand: 'Northlight',
      item_category: 'Footwear',
      price: 79.00,
      quantity: 1
    }]
  }
});

Advertising pixels: fewer moving parts than you think

Once the dataLayer is right, adding Meta, Google Ads, and TikTok is container configuration rather than store development. Each vendor reads the same events.

Two details worth getting right at the same time:

  • Meta deduplication. If you run the Conversions API — and on a store with meaningful spend you should — generate one event ID per conversion and send it from both browser and server. Meta Pixel vs Conversions API covers the pairing.
  • Google Ads value and currency. Send the same value definition you send GA4, or your ROAS numbers will disagree with your analytics for reasons nobody can later reconstruct.

Consent, if you sell into the EU or UK

BigCommerce has consent tooling, and several consent-management apps integrate with it. Requirements are the same as anywhere: Consent Mode v2 defaults set to denied before any Google tag loads, updated on the visitor's choice, including ad_user_data and ad_personalization.

Because Script Manager controls ordering explicitly, this is easier to get right on BigCommerce than on platforms where injection order is opaque — provided you actually place the consent default script ahead of the container and verify it.

The verification pass

Do this once properly and you will not need to think about it again for months:

  1. Count IDs on a rendered product page. Exactly one GA4 measurement ID. If you see two, native GA4 is still on alongside your GTM tag.
  2. Walk the funnel in GTM Preview — product, add to cart, cart, checkout, confirmation — and confirm each expected event fires once with a populated items array.
  3. Place a real test order and reconcile: one GA4 purchase, one Ads conversion, one Meta purchase, value matching the BigCommerce order total.
  4. Refresh the confirmation page twice. No additional purchase events should be recorded.
  5. Compare a full day of BigCommerce orders to GA4 purchases. Under about 5% variance is normal; over 20% needs investigation; GA4 higher than BigCommerce means duplicates.

The BigCommerce setup guide covers the install specifics, and the pre-launch tracking QA checklist is worth running before any theme change goes live.

FAQ

Should I use BigCommerce's native GA4 integration or GTM?

Use one. Native is fine if GA4 is all you need. If you run advertising pixels as well, GTM is better — one dataLayer feeding every vendor — and you should then turn the native integration off to avoid duplicate hits.

Why are my BigCommerce add-to-cart events missing?

Because BigCommerce does not emit GA4-shaped ecommerce events into the dataLayer by default. The add-to-cart push has to be added in the template at the point of the AJAX add; a trigger listening for it will otherwise never fire.

Does BigCommerce support server-side tagging?

Yes, in the sense that nothing prevents it: you can point your storefront at a server container on your own subdomain, and send server-side conversions from your backend or middleware. It is worth doing once you have three or more destinations for the same events.

Why does my BigCommerce revenue not match GA4?

Check three things in order: duplicate purchase events from confirmation-page reloads, a value definition that includes or excludes tax and shipping differently from your store reports, and consent blocking a share of EU sessions.

Can I track checkout steps on BigCommerce?

Generally yes — checkout is instrumentable on most plans, which makes a genuine step-by-step funnel achievable, unlike platforms that sandbox checkout entirely. Confirm what your plan allows before designing the events.

Check what your storefront is loading right now — the free tracking audit reports GA4 IDs, duplicate properties, Meta and TikTok pixels, and consent signals for any URL.


See where your tracking stands

Run the same 13-check audit referenced in this post against any URL. No signup, results in seconds.

Run a free audit