These snippets are dedicated for BigCommerce Stencil themes. If you currently have one of them, we recommend upgrading to our new Stencil snippets.

These snippets are here for your reference what exactly should be replace with the new ones. We suggest doing the following:

This way you will not mix them up and everything will be working properly. Please go to My Account > Connected store for a complete setup wizard.

These snippets have been valid until September 25, 2018. Here are the new snippets, if you want to replace them. We do not suggest continuing the use of old snippets as the following features will not be supported:

  • Sales tracking
  • Cart Recovery
  • Live View
  • Product Picker
  • Forms

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

Not sure, which theme you're using? Check BigCommerce guide to find out.


Adding the snippets

IMPORTANT: you need to replace the shopID (currently XXXXX) 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.

1. GOOGLE ANALYTICS TAB (on your BigCommerce store)

  • Go to Advanced Settings > Web Analytics, then open the Google Analytics tab. Copy and paste the code below.
  • If Google Analytics (GA) tracking code is already added there,  Omnisend sales tracking code should be below GA tracking tag. 
<script type="text/javascript">
    // SOUNDEST-V5-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(e,n,a){try{if(e.length>0&&n.length>0&&a.length>0){var t=!0,o=null,d=[],r=function(){if(!t&&d.length>0){for(var o=0;o<d.length;o++){var r=document.createElement("img"),i=["timestamp="+(new Date).getTime(),"shopBaseURL="+window.location.protocol+"//"+window.location.hostname+"/","shopID="+e,"shopType="+n,"orderID="+d[o],"source=ga"];r.src=a+"events/saveNewsletterOrder/?"+i.join("&"),document.body.appendChild(r)}d=[]}};if(void 0!==window.pageTracker){var i=window.pageTracker._addTrans,c=window.pageTracker._addItem,s=window.pageTracker._trackTrans;window.pageTracker._addTrans=function(e){o=e,i.apply(this,arguments)},window.pageTracker._addItem=function(e){o=e,c.apply(this,arguments)},window.pageTracker._trackTrans=function(){void 0!==o&&null!==o&&-1===d.indexOf(o)&&d.push(o),o=null,r(),s.apply(this,arguments)}}else window.pageTracker={_addTrans:function(e){o=e},_addItem:function(e){o=e},_trackTrans:function(){void 0!==o&&null!==o&&-1===d.indexOf(o)&&d.push(o),o=null,r()}};"loading"!==document.readyState?(t=!1,r()):document.addEventListener?document.addEventListener("DOMContentLoaded",function(){t=!1,r()}):document.attachEvent("onreadystatechange",function(){"loading"!==document.readyState&&(t=!1,r())})}}catch(n){}})(SOUNDEST.shopID,SOUNDEST.shopType,SOUNDEST.eventsHost);
</script>

  

2. FOOTER SCRIPTS

  • Go to Storefront Design > Design Options, then click the Scripts tab.
  • Find the mentioned script in the text area labeled Footer. If you have more than one script there, add Omnisend script below all of the scripts.
<div id="soundest-container"></div>
<script type="text/javascript">
    // SOUNDEST-V5-2-S
    // 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.pageType = "{{#if page_type}}{{page_type}}{{/if}}";
    SOUNDEST.productTitle = "{{#if product}}{{product.title}}{{/if}}";
    SOUNDEST.productID = "{{#if product}}{{product.id}}{{/if}}";
    SOUNDEST.categoryTitle = "{{#if category}}{{category.name}}{{/if}}";
    SOUNDEST.categoryID = "{{#if category}}{{category.id}}{{/if}}";
    (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>


For Blueprint snippet please click here
For OLD Blueprint snippet please click here

Which theme platform do you have: Stencil or Blueprint?

Did this answer your question?