X (Twitter) Pixel Tracking Setup for BigCommerce
Quick answer: Use the free container builder wizard to select X (Twitter) 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.
X 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 X (Twitter) Pixel container →
Events you can track
ecommerce events
- X (Twitter) Pixel Page View event setup
- X (Twitter) Pixel View Item event setup
- X (Twitter) Pixel View Item List event setup
- X (Twitter) Pixel Add to Cart event setup
- X (Twitter) Pixel Remove from Cart event setup
- X (Twitter) Pixel Begin Checkout event setup
- X (Twitter) Pixel Add Shipping Info event setup
- X (Twitter) Pixel Add Payment Info event setup
- X (Twitter) Pixel Purchase event setup
- X (Twitter) Pixel Refund event setup
- X (Twitter) Pixel Add to Wishlist event setup
- X (Twitter) Pixel Coupon Applied event setup
- X (Twitter) Pixel Search event setup
- X (Twitter) Pixel Login event setup
- X (Twitter) Pixel Sign Up event setup
engagement events
- X (Twitter) Pixel Form Submission event setup
- X (Twitter) Pixel Lead event setup
- X (Twitter) Pixel Phone Click event setup
- X (Twitter) Pixel WhatsApp Click event setup
- X (Twitter) Pixel Email Click event setup
- X (Twitter) Pixel Outbound Click event setup
- X (Twitter) Pixel Scroll event setup
- X (Twitter) Pixel File Download event setup
By Humayun Kabir Naim — Last updated: 9 November 2026
Quick answer
To track a BigCommerce store in X (Twitter) through Google Tag Manager, install GTM on every page through Script Manager, fire the X base pixel from GTM with your Pixel ID — after checking that no BigCommerce app injects the same pixel — and create each conversion in X Ads Events Manager first, because X gives every event its own ID and there is nothing to fire until that ID exists. A GTM tag then calls twq('event', '<that-event-id>', { ... }) on the matching data layer event: for purchase, on the purchase push from the order-confirmation page, carrying the order value, currency and the order ID as the conversion_id. Test with the X Pixel Helper, and treat the Conversions API as a later, larger build — it exists and deduplicates against the browser copy on conversion_id, but it is not a setting you switch on.
What gets tracked
X's model differs from every other hub in this series: there is no fixed list of standard event names to send. You define the events your store needs in Events Manager, X issues an ID per event, and your tags fire IDs. The container on this page covers all 23 events; the set most BigCommerce stores actually define is:
| Shopper action | Data layer event | X event you create | Parameters that matter |
|---|---|---|---|
| Any page viewed | page_view | (none — the base pixel covers it) | Builds audiences in X Ads |
| Product page viewed | view_item | Product View (custom event) | contents with the product ID |
| Product added to cart | add_to_cart | Add To Cart | contents, value, currency |
| Checkout started | begin_checkout | Checkout Started | contents, value, currency |
| Payment details entered | add_payment_info | Payment Info Added | value, currency |
| Order completed | purchase | Purchase | value, currency, conversion_id = order ID, contents |
| Account created | sign_up | Sign Up | — |
| Quote / contact form sent | form_submission / lead | Lead | — |
| Search submitted | search | Search | Search term if you map it |
| Coupon, wishlist, clicks, scroll | apply_coupon, add_to_wishlist, engagement events | Usually not defined | Leave them to GA4/Meta unless a campaign needs one |
One discipline follows from the model: the event ID is the event. A tag firing the Add To Cart ID on the purchase push records add-to-carts with purchase values, and Events Manager will not warn you — the IDs are opaque strings, so the mapping table above (which push fires which ID) is worth writing down before you build, exactly as you would a Meta events plan.
Deep dives: Page View, Purchase, Add to Cart, Begin Checkout, Sign Up. The shared data layer comes from the BigCommerce + GA4 hub. See all options on the BigCommerce hub.
Before you start
- An X Ads account, a pixel, and its Pixel ID. In X Ads: Tools → Events Manager — create the pixel and copy its ID (the dummy in this guide is
o1234). The pixel belongs to the ad account that will run the campaigns; a pixel created under a different account is invisible to the one buying ads. - Your events created in Events Manager before you open GTM. For each row of the table you intend to use: create the event, name it for the store action (Purchase, Add To Cart, …), and copy its event ID. This order is not bureaucracy — the GTM tags literally contain these IDs, so building tags first means rebuilding them later.
- One install only — sweep for the app. BigCommerce has no native X connection, so the pixel arrives via GTM, a manual Script Manager paste, or a tracking/pixel app from the marketplace. If an app already injects it, GTM must not add a second base pixel: every event downstream doubles, and unlike Meta there is no browser/server merge story to soften a doubled browser send. Remove the app's X toggle or skip the GTM base tag.
- GTM installed through Script Manager, and the data layer working. One web container per channel (Script Manager is per-storefront — the BigCommerce + GA4 hub covers the install), plus the confirmation-page purchase push built with
%%ORDER_ID%%/%%ORDER_AMOUNT%%. Every X event tag below reads that same layer.
Route 1: Use the free TagManagerBuilder container
Open the GTM Container Builder, choose BigCommerce, then X (Twitter) Pixel, and tick the events you want. Enter your Pixel ID and the event IDs from Events Manager, download the JSON, then in GTM go to Admin → Import Container and choose Merge → Overwrite conflicting tags, triggers, and variables. The container builds the base pixel as Custom HTML (X has no native GTM tag type) and one event tag per ticked event, wired to the data layer pushes. Complete the app sweep in Before you start first — the container cannot see an app injecting the same pixel. Test with the testing section below before publishing.
Route 2: Build it manually in GTM
Step 1 — The base pixel tag
Tags → New → Custom HTML, and paste the X base snippet with your Pixel ID:
<script>
!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments)},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='https://static.ads-twitter.com/uwt.js',a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
twq('config', 'o1234');
</script>
Set the trigger to All Pages. This tag loads the pixel and records the page views your X audiences are built from. Exactly one base pixel per page — see the app sweep above.
Step 2 — Variables that read the purchase push
The event tags need three values from the data layer, and your GA4 setup already exposes them. Reuse (or create) Data Layer Variables (Version 2) for:
ecommerce.value— the order total, sent as the event'svalueecommerce.currency— the order currency codeecommerce.transaction_id— the BigCommerce order ID, sent as the event'sconversion_id
For product-level detail, a Custom JavaScript Variable can map ecommerce.items into X's contents shape (content_id + num_items per item). Send the store's product IDs — the BigCommerce product ID (88 in this guide's examples), the same ID your other platforms use — so product reporting lines up across channels.
Step 3 — One event tag per event ID
For each event you created in Events Manager, make a Custom HTML tag that fires that event's ID on the matching data layer trigger. The purchase tag is the template for all of them:
<script>
twq('event', 'tw-o1234-purchase1', {
value: {{DLV - ecommerce.value}},
currency: {{DLV - ecommerce.currency}},
conversion_id: {{DLV - ecommerce.transaction_id}},
contents: {{JS - X Contents}}
});
</script>
(The event ID above is an illustrative dummy in Events Manager's tw-<pixel>-<event> shape — always use the exact ID Events Manager issued for your event.) Trigger: Custom Event on purchase. The conversion_id is doing quiet, essential work: it is the key X uses to deduplicate the browser event against a Conversions API copy of the same order, and it stops a refreshed confirmation page from reading as a second sale when the same order ID is presented again. Repeat the pattern per event — Add To Cart on add_to_cart, Checkout Started on begin_checkout, Sign Up on sign_up — each with its own event ID and only the parameters that event honestly has.
Step 4 — Audiences in X Ads
With the base pixel live, build audiences in X Ads (Tools → Audiences) from pixel traffic: all visitors, product viewers, cart adders, and a purchasers audience for exclusions. As on LinkedIn, audiences need traffic volume before they are targetable — create them on day one and let them fill while campaigns are planned.
A note on the Conversions API — later, and on purpose
X offers a Conversions API that sends events server-to-server, and it deduplicates against the browser pixel on the shared conversion_id — which is why Step 3 sends the order ID from the start: a store that adds the API later inherits clean deduplication for free. But be honest about the shape of it: the API is a developer integration (server endpoint, authentication, payload mapping), used mainly by larger advertisers and aggregators, not a BigCommerce setting or a GTM checkbox. For most BigCommerce stores the browser pixel through GTM is the whole job; revisit the API when ad-blocker losses are measurably costing more than the build would.
Test it: X Pixel Helper first, Events Manager second
- Install the X Pixel Helper extension and open the storefront. It should show your Pixel ID and the base pixel firing. Two pixels listed means the app trap from Before you start.
- In GTM Preview, click a product, add it to the cart and place a test order. Each event tag sits under Tags Fired on its matching push — and check the ID inside the tag, not just that a tag fired: the wrong-ID failure is silent everywhere else.
- On the confirmation page, confirm the Purchase event's
value,currencyandconversion_id(your test order's ID) in Preview's tag details — not blanks, not the product price standing in for the order total. - In Events Manager, watch for the same events arriving under the event names you created. New events can take time to appear and to become usable for optimisation; judge the setup in the Helper and Preview first.
- Re-open the confirmation page from the order email. With
conversion_idset to the order ID, the repeat view must not present as a second purchase in your reporting. - Publish in GTM only when the funnel is clean end to end, then repeat one live test order against the published container.
BigCommerce-specific troubleshooting
Events arrive, but under the wrong names — purchases show as add-to-carts. The event IDs are swapped between tags. X event IDs are opaque; nothing in the tag editor tells you which event an ID belongs to except the mapping you wrote down. Compare each tag's ID against Events Manager one by one — this is the platform's signature failure and it is always a mapping error, never a platform bug.
Every event doubles. A marketplace app is injecting the X pixel alongside GTM (or a leftover base snippet sits in Script Manager). Remove one injector and confirm a single pixel in the X Pixel Helper. A doubled browser pixel has no deduplication rescue.
Purchase fires with no value, or the product price instead of the order total. The variable is reading the wrong field of the push — an item price instead of ecommerce.value. On BigCommerce the confirmation push is built from %%ORDER_AMOUNT%%; if that placeholder's script only pushed item data, fix the push, not the X tag.
The base pixel fires on the storefront but never at checkout or confirmation. BigCommerce's Optimized One-Page Checkout commonly runs on its own checkout domain or subdomain, outside a storefront Script Manager install. Purchase tags keyed to the confirmation-page push survive if the push lives on that page — but if the base pixel itself is absent there, audiences and event attribution for the checkout leg go dark. Test the confirmation page directly with the Helper and cover the domain if it is missing.
Events Manager shows nothing, although Preview and the Helper are clean. Check you are looking at the right ad account's Events Manager — the pixel belongs to one account — and allow for processing delay on brand-new events. A pixel verified firing with the correct IDs is a working pixel; the reporting layer catching up is not a reason to rebuild tags.
A second storefront has no X data. Script Manager is per-channel. Install the container (and with it the base pixel) on every storefront that takes traffic you advertise to, with the Pixel ID that channel's account uses.
Next steps: the same data layer feeds the other channels — the BigCommerce + Google Ads hub and the BigCommerce + Meta hub, and Consent Mode v2 keeps the whole layer consent-aware.
Frequently asked questions
Why does X make me create events before I can fire them?
Because X's current model is ID-based rather than name-based: an event exists when Events Manager creates it and issues its ID, and twq('event', ...) can only fire IDs that exist. It feels backwards if you arrive from Meta's named standard events, but it has one advantage — two stores' "Purchase" events can never collide, because the IDs are unique to your pixel.
Is there a native BigCommerce connection for X, like Meta has?
No. Data Solutions has no X connection and BigCommerce publishes no official X install guide. The pixel arrives through GTM, a manual snippet, or a third-party app — which is precisely why the one-install sweep in Before you start exists.
What is conversion_id, and why the order ID?
conversion_id is the deduplication key X uses to recognise two copies of the same conversion — principally the browser pixel's copy and a Conversions API copy — as one. The order ID is the natural value: unique per order, stable across a confirmation-page refresh, and already present in the purchase push. An event without it, or with a random value per fire, cannot be deduplicated.
Do my product IDs need to match a catalog, like Meta's content_ids?
There is no BigCommerce catalog sync into X to match against — X offers no equivalent of Meta's product-group feed matching for this setup. Send the store's product IDs in contents anyway: product-level reporting and any future dynamic formats key off them, and consistency with the IDs your other platforms use costs nothing. Just do not expect feed-style matching to appear because the IDs are present.
Should I set up the X Conversions API now?
For most BigCommerce stores, no. It is a server-side developer integration aimed at larger advertisers, and the browser pixel covers the funnel in this hub. What you should do now is the cheap future-proofing: send conversion_id (the order ID) on purchase from day one, so if the API is added later, deduplication works immediately instead of being retrofitted.
My Pixel Helper shows the pixel, but Events Manager stays empty. Broken?
Probably not. Confirm the pixel belongs to the ad account whose Events Manager you are viewing, fire a real event (a test purchase, not just page views), and allow processing time for newly created events. If the Helper shows the correct event ID firing with parameters, the send side is proven — the gap is account selection or reporting delay.