If you own a Bigcommerce store and want to use features of Omnisend, you need to add the codes, based on your theme framework: Blueprint or Stencil. Not sure, which theme you're using? Check Bigcommerce guide to find out.

The setup is simple - just copy the codes and paste them at the bottom of templates we specified.

These snippets have been updated on November 27, 2017. Here are the old snippets, if you want to replace them. We do not suggest continuing the use of old snippets.


IMPORTANT:
if you are changing template, you will need to add our snippet again. Do not add both snippets at once (Blueprint and Stencil), neither of them will work in such case.


1. Add Sales Tracking code to Scripts tab above Google Analytics script

1. Copy the script below.

IMPORTANT: you need to replace the shopID (currently XXXXXX) with your own shopID, otherwise the code will not work. You can find your id in the address bar when you are logged in to your store control panel. If you cannot find it, check out Bigcommerce guide on it.

<script type="text/javascript">
    // SOUNDEST-V4-1
    // Do not remove these comments, they are super important!
    window.SOUNDEST = window.SOUNDEST || {};
    // Do not forget to replace XXXXXX with your shop ID! You can find it in your shop's permanent address: https://store-XXXXXX.mybigcommerce.com/. How to find it: https://goo.gl/1XddvQ
    SOUNDEST.shopID = "XXXXXX";
    SOUNDEST.shopType = "bigcommerce";
    SOUNDEST.eventsHost = "https://events.soundestlink.com/";
    (function(n,e,a){try{if(n.length>0&&e.length>0&&a.length>0){var o=!0,t=null,r=[],i=function(){if(!o&&r.length>0){for(var t=0;t<r.length;t++){var i=document.createElement("img"),d=["timestamp="+(new Date).getTime(),"shopBaseURL="+window.location.protocol+"//"+window.location.hostname+"/","shopID="+n,"shopType="+e,"orderID="+r[t],"source=ga"];i.src=a+"events/saveNewsletterOrder/?"+d.join("&"),document.body.appendChild(i)}r=[]}};if(void 0!==window.pageTracker){var d=window.pageTracker._addTrans,c=window.pageTracker._addItem,p=window.pageTracker._trackTrans;window.pageTracker._addTrans=function(n){t=n,d.apply(this,arguments)},window.pageTracker._addItem=function(n){t=n,c.apply(this,arguments)},window.pageTracker._trackTrans=function(){void 0!==t&&null!==t&&-1===r.indexOf(t)&&r.push(t),t=null,i(),p.apply(this,arguments)}}else window.pageTracker={_addTrans:function(n){t=n},_addItem:function(n){t=n},_trackTrans:function(){void 0!==t&&null!==t&&-1===r.indexOf(t)&&r.push(t),t=null,i()}};window.onload=function(){o=!1,i()}}}catch(n){}})(SOUNDEST.shopID,SOUNDEST.shopType,SOUNDEST.eventsHost);
</script>


2. Go to Advanced Settings > Web Analytics on Bigcommerce, then open the Google Analytics tab. If you do not see that tab, enable Google Analytics Package in Providers list (in that very same page) and click Save.

3. If Google Analytics (GA) tracking code is already added there, paste Omnisend sales tracking code below GA tracking tag. Placing it above GA code will break the implementation.


2. Add additional tracking codes

1. Open Panels/Footer.html and add the code below to the bottom of the current code.

IMPORTANT: you need to replace the shopID (currently XXXXXX) with your own shopID, otherwise the code will not work. You can find your id in the address bar when you are logged in to your store control panel. If you cannot find it, check out Bigcommerce guide on it.

<div id="soundest-container"></div>
<script type="text/javascript">
    // SOUNDEST-V4-2-B
    // Do not remove these comments, they are super important!
    window.SOUNDEST = window.SOUNDEST || {};
    // Do not forget to replace XXXXXX with your shop ID! You can find it in your shop's permanent address: https://store-XXXXXX.mybigcommerce.com/. How to find it: https://goo.gl/1XddvQ
    SOUNDEST.shopID = "XXXXXX";
    SOUNDEST.shopType = "bigcommerce";
    SOUNDEST.baseURL = "https://omnisrc.com/";
    SOUNDEST.version = new Date().toISOString().slice(0, 13);
    SOUNDEST.productID = SOUNDEST.productID || "";
    SOUNDEST.additionalData = SOUNDEST.additionalData || {};
    SOUNDEST.additionalData.email = "%%GLOBAL_CurrentCustomerEmail%%";
    SOUNDEST.cartItems = "%%GLOBAL_CartItems%%";
    (function(t,e){try{if(t.length>0&&e.length>0&&window.location.hash.length>0&&"recoverCart"===JSON.parse(decodeURIComponent(window.location.hash.substring(1))).action){var i=document.createElement("div"),n=document.getElementById("soundest-container");i.id="soundest-cart";i.innerHTML='<div id="soundest-cart-overlay" style="position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:#ffffff;z-index:1100000001;opacity:0.9;"></div><img id="soundest-cart-loader" style="position:fixed;top:50%;left:50%;margin-top:-20px;margin-left:-20px;width:40px;height:40px;z-index:1100000002;border-width:0px;" alt="" src="'+t+"inshop/images/loading.gif?v="+e+'" width="40" height="40" />';n.appendChild(i)}}catch(f){}})(SOUNDEST.baseURL,SOUNDEST.version);
    (function(e,t){try{if(e.length>0&&t.length>0){var n=document.createElement("script"),c=document.getElementById("soundest-container");n.type="text/javascript";n.id="soundest-launcher";n.src=e+"inshop/bigcommerce-launcher.js?v="+t;c.parentNode.insertBefore(n,c)}}catch(f){}})(SOUNDEST.baseURL,SOUNDEST.version);
</script>


2. Open Snippets/ProductAddToCart.html and add to the bottom of the code 

<script type="text/javascript">
    // SOUNDEST-V4-3-B
    // Do not remove these comments, they are super important!
    window.SOUNDEST = window.SOUNDEST || {};
    SOUNDEST.productID = "%%GLOBAL_ProductId%%";
</script>

3. Open Snippets/FastCartThickBoxContent.html and add to the bottom of the code 

<!-- SOUNDEST-V4-4-B -->
<!-- Do not remove these comments, they are super important! -->
<!-- SOUNDEST-FASTCART-QUANTITY:%%GLOBAL_fastCartQuantity%% -->
<!-- SOUNDEST-FASTCART-PRICE:%%GLOBAL_fastCartProdTotal%% -->
<!-- SOUNDEST-FASTCART-LINK-IMAGE:%%GLOBAL_fastCartProdImg%% -->
<!-- SOUNDEST-CART-ITEMS:%%GLOBAL_fastCartNumItemsTxt%% -->

4. Open Snippets/CartItem.html and add to the bottom of the code 

<!-- SOUNDEST-V4-5-B -->
<!-- Do not remove these comments, they are super important! -->
<!-- SOUNDEST-ITEM-%%GLOBAL_CartItemId%%-ID:%%GLOBAL_ItemId%% -->
<!-- SOUNDEST-ITEM-%%GLOBAL_CartItemId%%-QUANTITY:%%GLOBAL_ProductQuantity%% -->
<!-- SOUNDEST-ITEM-%%GLOBAL_CartItemId%%-VARIATION:%%GLOBAL_VariationId%% -->
<!-- SOUNDEST-ITEM-%%GLOBAL_CartItemId%%-PRICE:%%GLOBAL_ProductPrice%% -->
<!-- SOUNDEST-ITEM-%%GLOBAL_CartItemId%%-LINK-IMAGE:%%GLOBAL_ProductImage%% -->
<!-- SOUNDEST-ITEM-%%GLOBAL_CartItemId%%-ATTRIBUTES:%%GLOBAL_ProductOptions%% -->
<!-- SOUNDEST-ITEM-%%GLOBAL_CartItemId%%-EVENT:%%GLOBAL_EventDate%% -->
<!-- SOUNDEST-ITEM-%%GLOBAL_CartItemId%%-WRAPPING:%%GLOBAL_GiftWrappingName%% -->
<!-- SOUNDEST-CART-ITEMS:%%GLOBAL_CartItems%% -->

For Stencil codes please click here

Which theme platform do you have: Stencil or Blueprint?

Did this answer your question?