How to track a BigCommerce store: tag, orders and sources
Add an analytics tag to BigCommerce with Script Manager, why to keep it off checkout under PCI DSS 4.0, and three ways to count orders with their source.
On this page
To add analytics to a BigCommerce store, paste the tag into Storefront › Script Manager as a header script on Storefront pages, and count orders from the Order Confirmation page or from your server. BigCommerce's own reports count orders and revenue; what they cannot tell you is which ad, email or post brought each buyer.
This page covers the install, why the tag should stay off the checkout page, and three ways to count orders with their source. Sporetag has no BigCommerce connector; everything here works with what Sporetag does today.
Script Manager in one minute
Script Manager lists every script on the store, from apps and from you. It works on stores with Stencil themes (BigCommerce). Each script has a Placement (header or footer) and a Location:
| Location | Runs on |
|---|---|
| Storefront pages | Every page except checkout and order confirmation |
| Checkout | The checkout page (Optimized One-Page Checkout only) |
| Order Confirmation | The order confirmation page |
| All pages | Storefront, checkout, order confirmation and cart |
Each script also takes a Script category (Essential, Analytics, Functional or Targeting/Advertising), which BigCommerce's cookie consent banner uses to let shoppers opt out of a category. Uncategorized scripts count as Essential, which shoppers cannot opt out of (BigCommerce). Label an analytics tag as Analytics.
Keep the tag off checkout
BigCommerce asks for at least one integrity (SRI) hash for any script on a payment page, such as checkout, to meet PCI DSS requirements, and the hash stops matching whenever the script's provider updates it (BigCommerce). An analytics tag that is updated from time to time would then stop loading on checkout without warning.
So pick Storefront pages for the tag and add a second script for Order Confirmation. You lose the checkout steps in between, and keep every page view and the order itself.
Install Sporetag on BigCommerce
- In Sporetag, add your store's domain and copy the tag from Set up your site.
- In BigCommerce, go to Storefront › Script Manager and click Create a Script.
- Name it
Sporetag, set Placement to header, Location to Storefront pages, Script category to Analytics, and for Script type choose to enter the script yourself rather than link to a URL. - Paste the tag and click Save.
- Create a second script the same way with Location set to Order Confirmation.
- Open your store in a new tab and click Check my site in Sporetag.
Count orders with their source
Three methods, from no code to the most complete:
| Method | Counts | Value | Misses |
|---|---|---|---|
| Order confirmation page | Each order whose buyer reaches the page | No | Buyers who close the tab or block the tag |
| Your Stripe account | Payments and refunds through a Stripe account you own | Yes | Orders paid with other methods |
| Order webhook to your server | Every order, from BigCommerce itself | Yes | Nothing, once built |
Order confirmation page. Make a test order, copy the path of the page you land on, and add a Someone reaches a thank-you page goal for it. It counts orders, not their value, and works in every tracking mode.
Stripe. If your store takes cards through a Stripe account you own, the Stripe connector reads payments and refunds on paid plans. It matches payments to customers by email and phone, so a sale ties to earlier visits when that customer was identified on your site.
Webhook. BigCommerce sends a store/order/created webhook when an order is placed. Its payload carries only the order id, so your code reads the order from BigCommerce's API, then sends it on (BigCommerce). With Sporetag, send it to the Events API with the order number as event_id and the buyer's email, which Sporetag hashes on arrival.
Server-side vs client-side tracking explains why the server copy is the one to trust for revenue.
Make ad traffic count
- Tag every ad, email and social link with UTM parameters, so orders by source have a source.
- Report revenue from BigCommerce or Stripe once, and each ad platform's own sales as that platform's claim. The ecommerce dashboard template shows which card should count what.
Common questions
Where do I add tracking code in BigCommerce?
In Storefront › Script Manager, with Create a Script. Pick the placement, the pages it runs on and its category. Script Manager works on Stencil themes.
Can I add an analytics script to BigCommerce checkout?
Only with Optimized One-Page Checkout, and BigCommerce asks for an integrity hash on scripts that run on payment pages. For analytics, the order confirmation page is simpler and counts the order.
Why does my BigCommerce tracking script not load for some shoppers?
With the cookie consent banner on, shoppers can opt out of a script's category, such as Analytics. Ad blockers stop some tags too. Count revenue from your server or payment system for a complete number.
Does BigCommerce work with Google Analytics 4?
Yes. BigCommerce has a Google Analytics 4 connection under Settings › Data solutions, and Script Manager takes any other tag. Use one or the other for GA4, not both, or page views count twice.
Sources
- BigCommerce Help Center: Using Script Manager. Checked October 2026.
- BigCommerce Dev Center: Webhook events, Scripts API: create a script. Checked October 2026.
Spotted something wrong or out of date? Email hello@sporetag.com and we will fix it.