Install on BigCommerce
BigCommerce uses its built-in Script Manager for any custom storefront code. You'll create two (or three) scripts: one for the GTM head snippet, one for the noscript, and optionally one for the order-confirmation page purchase event.
Step 1 — Open Script Manager
- BigCommerce Admin → Storefront → Script Manager
- Click Create a Script
Step 2 — Create the head script
Settings:
- Name: Google Tag Manager (head)
- Description: TagEasy GTM container
- Location on page: Head
- Select pages where script will be added: All pages
- Script category: Essential
- Script type: Script (not URL)
Paste the GTM head snippet from the wizard's BigCommerce Install tab into the script field. Save.
Step 3 — Create the footer script
Same settings except:
- Name: GTM noscript (footer)
- Location on page: Footer (BigCommerce injects right after
<body>)
Paste the GTM noscript snippet. Save.
Step 4 — Order Confirmation page (e-commerce only)
BigCommerce's order confirmation page runs in a separate context. To capture the purchase event with the actual transaction value, create a third script:
- Location on page: Footer
- Select pages: Order Confirmation
- Script type: Script
- The script body pushes a
purchaseevent to the dataLayer using the values BigCommerce exposes inwindow.BCData. See BigCommerce's GA setup guide for the variable names.
Pre-built event templates for BigCommerce
bigcommerce:ga4:view_itembigcommerce:ga4:add_to_cartbigcommerce:ga4:begin_checkoutbigcommerce:ga4:purchase— fires on the order confirmation page
Verify in GTM Preview
- GTM Preview mode → enter your storefront URL
- Browse to a product page → expect
view_item - Add to cart → expect
add_to_cart - Proceed to checkout → expect
begin_checkout - Place a test order → expect
purchaseon the confirmation page (only fires if Step 4 is done)
Common gotchas
- Stencil themes — fully supported. The Script Manager method works on any Stencil-based theme.
- Headless / channels API — Script Manager doesn't apply. Inject GTM directly in your headless storefront's top-level layout.
- Checkout customization — BigCommerce's default checkout fires events that GTM can read. If you use a custom checkout (Checkout SDK), you'll need to push dataLayer events from your custom code.