Skip to content
🚀 Find us on Product Hunt

Meta Pixel Tracking Setup for BigCommerce

Quick answer: Use the free container builder wizard to select Meta Pixel and your events, enter your tracking ID, then import the generated file into Google Tag Manager - no manual tag setup needed for any of the 23 events below.

Facebook/Instagram Pixel base code and standard events, generated as Custom HTML. This platform does not have a native GTM tag type, so the container wraps its base code in a Custom HTML tag.

Build my Meta Pixel container →

Events you can track

ecommerce events

engagement events

By Humayun Kabir Naim — Last updated: 8 November 2026

Quick answer

To track a BigCommerce store in Meta through Google Tag Manager, first decide who sends what — because BigCommerce's native Meta connection (Settings → Data Solutions) already sends a browser Pixel and Conversions API events by itself. If you keep the native connection as your measured core, GTM adds only the events it misses (refunds, coupon use, custom audiences events) and never re-sends the standard ones. If you replace it, disconnect the native connection first, then run the full standard set from GTM — base Pixel on every page, one event tag per Meta event reading the same GA4-format data layer as your GA4 setup — and add the server copy through server-side GTM. Either way: one sender per event, content_ids that match your catalog exactly, and the same event_id on the browser and server copies of every event you send twice on purpose.

BigCommerce native Meta Pixel connection in Data Solutions

What gets tracked

The standard funnel, with the column that matters on BigCommerce: who already sends it.

Shopper actionData layer eventMeta eventNative connection sends it?
Data layer eventMeta eventNative connection sends it?
Product page viewedview_itemViewContentYes — product ID, with value and currency
Product added to cartadd_to_cartAddToCartYes — but see the quantity note below
Checkout startedbegin_checkoutInitiateCheckoutYes — with contents, num_items and value
Payment step reachedadd_payment_infoAddPaymentInfoYes — fired from the order confirmation page
Order completedpurchasePurchaseYes — browser copy on the confirmation page, CAPI copy from the order itself
Search submittedsearchSearchYes — with the search string
Account created(account flow)CompleteRegistrationYes — signup flow only, not checkout accounts
Product added to wishlist(wishlist action)AddToWishListYes
Newsletter subscribed(subscribe page)LeadYes — this is the native connection's only Lead
Order refunded— (no page exists)No standard eventNo — server-side custom event only
Coupon applied at checkoutapply_couponNo standard eventNo — custom event if you need it

Three platform facts shape how you read this table. The native value definition: the native connection's Purchase value is the sum of line items with shipping and tax excluded and discounts included — if your GTM purchase carries the order total instead, the two senders report different revenue for the same order, and any overlap period poisons comparisons. The quantity-1 limitation: the native AddToCart always values the event as if quantity were 1, and it ignores quantity changes and removals on the cart page — so native AddToCart values systematically understate multi-quantity carts. Coverage asymmetries: the native CAPI sends Purchase even when the shopper never lands on the confirmation page (abandoned confirmation, payment redirect quirks), while the browser pixel only fires there — and advanced matching data goes with Purchase and CompleteRegistration for every shopper, but with other events only for logged-in shoppers. None of this makes the native connection bad; it makes it a defined sender with known behaviour, which is exactly why the decision below comes first.

Deep dives: View Item, Add to Cart, Begin Checkout, Purchase, Refund. Running GA4 too? Build the shared layer first: BigCommerce + GA4. See all options on the BigCommerce hub.

Before you start

  1. Choose the architecture — before touching any setting. Option A (keep native): the Data Solutions connection stays as the sender for the standard events, and GTM is used only for what native cannot send. Option B (replace native): disconnect Data Solutions, and GTM (browser) plus server GTM (server) send everything. Both are legitimate; the illegitimate setup is the accidental third option — native on, GTM sending the same standard events, plus a server container also sending them. Decide, write it down, and make every later step match the decision.
  2. A Meta dataset (Pixel) and its ID — the same one in every sender. In Events Manager: Connect Data Sources → Web → Meta Pixel. Meta now calls it a dataset; the dataset ID is the same number as the old Pixel ID. If the native connection was set up under a different Facebook account, Business Manager or Pixel than your GTM work expects, reconcile that first — a Pixel mismatch looks exactly like a tracking outage.
  3. GTM installed through Script Manager, and the data layer working (Option B; Option A needs GTM only for its extra events). One web container, installed per channel (Script Manager is per-storefront — the BigCommerce + GA4 hub covers the install). The data layer app pushes from that setup — GA4-schema events such as purchase with an ecommerce object — are the raw material for the Meta tags below. If the app decorates event names (for example purchase_stape), either turn decoration off or point your triggers at the decorated names; a trigger listening for purchase never fires on purchase_stape.
  4. Your catalog's ID convention, confirmed. The native connection sends content_ids as BigCommerce product IDs (the numeric product.id) with content_type: product_group. Open your catalog in Commerce Manager and confirm the feed carries the same product IDs under the same content type. Every sender you keep or add must use that exact pair — see the catalog section below.
  5. Consent tooling that talks to the store's categories. The native connection only shares data when the shopper consents to BigCommerce's "Targeting; Advertising" category. Your GTM tags and any consent banner must honour the same choice; a store where native respects consent and GTM ignores it (or the reverse) has inconsistent data and a compliance problem, not just a measurement problem.
Native BigCommerce events arriving in Meta Test Events from browser and server

Route 1: Use the free TagManagerBuilder container

Open the GTM Container Builder, choose BigCommerce, then Meta Pixel, and tick the events you want. Enter your Pixel ID, download the JSON, then in GTM go to Admin → Import Container and choose Merge → Overwrite conflicting tags, triggers, and variables. This container is the Option B build (full standard set from GTM) — if you chose Option A, import it only for the extra events you actually need, and delete or pause the standard-event tags before publishing. If a GA4 container from this site is already in the workspace, import into the same workspace so the two share the data layer variables. Test with the testing section below before publishing.

Route 2: Build it manually in GTM

Step 1 — Settle the native connection

For Option A, leave Data Solutions as it is, and skip to Step 5 — your GTM work is only the events native misses. For Option B, go to Settings → Data Solutions, open the Meta Pixel connection and click Disconnect. Do this before the GTM tags go live, not after: every day of overlap is a day of doubled standard events that deduplication cannot repair (two browser senders are never deduplicated — see the CAPI section). Also sweep for the other quiet senders before they surprise you: a Pixel base snippet pasted into Script Manager by a previous setup, and the legacy Affiliate Conversion Tracking field, which fires on the confirmation page.

Meta Pixel base tag in GTM on the All Pages trigger for a BigCommerce store

Step 2 — The base Pixel tag

Tags → New, choose the Meta Pixel template from the Community Template Gallery (or a Custom HTML tag if you prefer raw code), enter your Pixel ID, and set the trigger to All Pages. This tag initialises the Pixel and sends PageView on every page. Under Option B this is now the only base Pixel on the store — if a second base tag exists in the container, or the native connection is still on, every event downstream doubles.

Step 3 — Variables that translate the data layer into Meta parameters

Meta wants product IDs in content_ids and a contents array; the data layer holds ecommerce.items with item_id, price and quantity. Create these in Variables → New:

function() {
  var items = {{DLV - ecommerce.items}} || [];
  return items.map(function(item) { return item.item_id; });
}
function() {
  var items = {{DLV - ecommerce.items}} || [];
  return items.map(function(item) {
    return { id: item.item_id, quantity: item.quantity || 1, item_price: item.price };
  });
}

The mapping only works if item_id in the push is the BigCommerce product ID — the same value the native connection sends and the catalog feed carries. If your data layer app emits SKUs in item_id instead, fix the mapping here (read the SKU's product ID) or fix the app — do not leave two ID systems running across senders.

Custom JavaScript variable mapping BigCommerce product IDs to Meta content IDs

Step 4 — One event tag per Meta event

Create a tag of the Meta Pixel template type (or a Custom HTML tag with an fbq() call) for each standard event you are responsible for. Each tag needs three things: the Meta event name, the parameters from Step 3, and a trigger on the matching data layer event (view_item → ViewContent, add_to_cart → AddToCart, begin_checkout → InitiateCheckout, purchase → Purchase).

For the Purchase tag, the parameters are value (from ecommerce.value), currency, content_ids (the Custom JS variable), contents, content_type set to the fixed text product_group, and an eventID equal to the transaction_id. One BigCommerce decision hides in value: the native connection's Purchase value excludes shipping and tax, so if any native-sent history or a parallel sender uses that definition, match it — two value definitions for one event name will make Ads Manager and your order export disagree forever. In an fbq() call the tag looks like:

fbq('track', 'Purchase', {
  value: 129.99,
  currency: 'USD',
  content_ids: ['88'],
  contents: [{ id: '88', quantity: 1, item_price: 129.99 }],
  content_type: 'product_group'
}, { eventID: '1042' });
Meta Purchase tag in GTM with catalog product IDs and the order ID as event ID

Step 5 — The events native misses (both options)

Whichever architecture you chose, some events have no native sender and no product page to fire from:

Multi-storefront: reconcile the two models channel by channel

The native connection is global by default: one Data Solutions setup applies to every storefront, and a channel only differs if someone sets a per-storefront override in Channel Manager → (storefront) → Data solutions. GTM is the opposite: Script Manager belongs to each channel, so the container and pushes are installed per storefront, and a channel without them is invisible to GTM. Put together, a two-storefront store can easily end up with native sending everywhere, GTM sending on the main storefront only, and a forgotten channel override pointing at a different Pixel. Audit it as a table — one row per channel: which Pixel, sent by whom, for which events — and make every row match your architecture decision. Brands that separate storefronts by market often *want* a different Pixel per channel; that is fine, as long as it is deliberate and the override and the GTM install agree.

Per-storefront Meta Pixel override in BigCommerce Channel Manager

Test it: GTM Preview and Meta Test Events

GTM Preview purchase event with the Meta tag fired on the BigCommerce confirmation page
  1. Click Preview in GTM and open the storefront in Tag Assistant. Shop like a customer: product page, add to cart, checkout, test order.
  2. In the Preview timeline, click view_item, add_to_cart, then purchase. Under Option B, your Meta tags sit under Tags Fired each time with the right parameters. Under Option A, confirm the opposite: the standard events do not fire from GTM — if they do, you have built the accidental third architecture.
  3. In Events Manager, open Test Events, enter your store URL, and repeat the flow. Events should arrive within seconds, each once. For every event, open its detail and read the source: Browser, Server, or both merged (deduplicated). A standard event arriving twice from Browser is a second browser sender — deduplication will never fix it; find and remove it. The same event from Browser + Server with no merge is an event_id mismatch.
  4. Run the quantity test: add the same product with quantity 3. Under native sending, the AddToCart value will reflect quantity 1 — that is the documented limitation, not your bug. Under GTM sending, the value should reflect the real cart. Know which behaviour your store has before anyone compares AddToCart value to revenue.
  5. Check the confirmation gap: place the test order so the shopper "never reaches" the confirmation page if you can simulate it (close the tab at payment, return via the order email). Under native CAPI, the Purchase still arrives server-side. Under Option B, it arrives only if your server container receives the purchase webhook — a browser-only Option B has no such safety net, and that trade-off should be a conscious choice.
  6. Only when the funnel is clean end to end, click Submit in GTM to publish. Then watch Events Manager's deduplication view for the first days: the deduplicated count should be visibly non-zero if you run browser + server on purpose.
Duplicate Purchase events from two browser senders in Meta Test Events

Conversions API and deduplication — two axes, not one

The Conversions API sends the same events from a server, recovering what the browser loses to blockers, privacy settings and dropped connections. On BigCommerce you can have up to three server-capable paths without noticing: the native connection's CAPI, a server GTM container fed by data layer pushes, and a server GTM container fed by order webhooks. The deduplication rules decide which combinations survive:

Axis 1 — browser vs server (deduplication works). The browser event and the server event for the same action must carry the same event_name and the same event_id, and the second copy must arrive within 48 hours of the first. Meta keeps one and merges the match data. On this platform the shared key is ready-made: the order ID. Your GTM Purchase tag sends eventID: transaction_id; the server copy (native CAPI, or your sGTM CAPI tag fed by the purchase webhook) must carry event_id set to the same order ID. For non-purchase events, generate the ID once where the action happens and pass that single value down both paths — IDs generated independently per path never match.

Axis 2 — same-side duplicates (deduplication never works). Meta does not deduplicate two browser events against each other, or two server events against each other. Native browser pixel + GTM browser pixel sending Purchase is two purchases, permanently. Native CAPI + sGTM CAPI sending Purchase is also two purchases. This is why the architecture decision in "Before you start" is not housekeeping — it is the entire game. Every extra same-side sender must be disconnected or paused, not configured around.

Mechanics that follow from the two axes: if you run Option A (native core), do not add an sGTM CAPI tag for the standard events — native already sends the server copy, and you would be building an Axis-2 duplicate. If you run Option B, the clean server path is the webhook: the order-created webhook reaches the server container even when the shopper never sees the confirmation page, which is the one coverage advantage native CAPI has — take it deliberately. And whichever option: verify in Test Events that each doubly-sent event shows one event with two sources, not two events. The full server-side build lives in the Server-Side Tracking guide.

One Purchase event deduplicated from browser and server sources in Events Manager

Frequently asked questions

Should I keep BigCommerce's native Meta connection or replace it with GTM?

Either can be right; running both for the same events is always wrong. Keep native if the standard events are all you need and its definitions (product-group IDs, shipping/tax-excluded value) match your catalog and reporting. Replace it when you need events native never sends, custom parameters, a different value definition, or one data layer feeding GA4, Ads and Meta identically. What you cannot do is decide later — overlap first, questions second is how stores end up with a month of doubled purchases.

Does deduplication fix it if I run the native pixel and GTM together?

No. Deduplication only merges a browser copy with a server copy that share an event_id. Two browser senders — native pixel and your GTM pixel — are never merged, no matter what IDs they carry. The only fix is removing one sender. This is the single most misunderstood point in BigCommerce Meta tracking, and it is why this hub leads with the architecture decision.

Why do my dynamic ads underperform even though events arrive?

Usually the IDs. Dynamic ads match events to the catalog by content_ids + content_type. The native connection sends BigCommerce product IDs as product_group; if your GTM events send SKUs, or content_type: product, the events arrive, look healthy in Events Manager, and match nothing in the catalog. Align every sender to the feed's convention — product IDs, product_group — and the same ads start working.

The native AddToCart value looks too low on multi-quantity carts. Is it broken?

No — it is the documented behaviour: the native connection values AddToCart as if quantity were 1, always, and it does not record quantity changes or removals on the cart page. If accurate cart values matter for your optimisation, that is an argument for Option B (GTM sending, where the push carries the real quantity) — or for simply not judging the store by AddToCart value.

I run two storefronts. Can they use different Pixels?

Yes — deliberately. The native connection supports a per-storefront override in Channel Manager → Data solutions, and GTM installs per channel anyway. What breaks stores is the accidental version: global native connection, a forgotten override on one channel, and GTM installed on only one storefront. Audit per channel and write the decision down.

Does the native connection send the Purchase if the shopper never reaches the confirmation page?

Its Conversions API copy does, yes — that is a genuine advantage of the native connection, and the honest cost of a browser-only GTM setup. If you replace native with GTM, close the gap with the purchase webhook into server GTM; if you cannot, acknowledge the missing orders rather than discovering them at reconciliation time.

Share with