Go back

VWO Integration Instructions

Below is the integration instructions for %client_name%.

Part 1: Site Tracking

  1. Sign in to your Shopify web store as an administrator.
  2. From the navigation bar, go to Sales channels > Online Store.
  3. Select the Themes tab, and from the Actions dropdown, select Edit Code.
  4. Go to the theme.liquid file on the customization panel and then add the code included below right before the line that says </head>
  5. Click Save.
<!-- Start VWO Async SmartCode -->
<script type="text/javascript">
window._vwo_code = window._vwo_code || (function(){
var account_id=%account_id%,
settings_tolerance=4000,
library_tolerance=4000,
use_existing_jquery=false,
is_spa=1,
hide_element='body',
/* DO NOT EDIT BELOW THIS LINE */
f=false,d=document,code={use_existing_jquery:function(){return use_existing_jquery;},library_tolerance:function(){return library_tolerance;},finish:function(){if(!f){f=true;var a=d.getElementById('_vis_opt_path_hides');if(a)a.parentNode.removeChild(a);}},finished:function(){return f;},load:function(a){var b=d.createElement('script');b.fetchPriority='high';b.src=a;b.type='text/javascript';b.innerText;b.onerror=function(){_vwo_code.finish();};d.getElementsByTagName('head')[0].appendChild(b);},init:function(){window.settings_timer=setTimeout(function () {_vwo_code.finish() },settings_tolerance);var a=d.createElement('style'),b=hide_element?hide_element+'{opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important;}':'',h=d.getElementsByTagName('head')[0];a.setAttribute('id','_vis_opt_path_hides');a.setAttribute('type','text/css');if(a.styleSheet)a.styleSheet.cssText=b;else a.appendChild(d.createTextNode(b));h.appendChild(a);this.load('https://dev.visualwebsiteoptimizer.com/j.php?a='+account_id+'&u='+encodeURIComponent(d.URL)+'&f='+(+is_spa)+'&r='+Math.random());return settings_timer; }};window._vwo_settings_timer = code.init(); return code; }());
</script>
<!-- End VWO Async SmartCode -->

Part 2: Revenue Tracking

Procedure

  1. Sign in to your Shopify web store as an administrator.
  2. From the navigation bar, click Settings.
  3. On the Settings page, click Checkout.
  4. Place the following script in the Additional Scripts field.
  5. Click Save.
<!-- Start VWO Async SmartCode -->
<script type="text/javascript">
window._vwo_code = window._vwo_code || (function(){
var account_id=%account_id%,
settings_tolerance=4000,
library_tolerance=4000,
use_existing_jquery=false,
is_spa=1,
hide_element='body',
/* DO NOT EDIT BELOW THIS LINE */
f=false,d=document,code={use_existing_jquery:function(){return use_existing_jquery;},library_tolerance:function(){return library_tolerance;},finish:function(){if(!f){f=true;var a=d.getElementById('_vis_opt_path_hides');if(a)a.parentNode.removeChild(a);}},finished:function(){return f;},load:function(a){var b=d.createElement('script');b.fetchPriority='high';b.src=a;b.type='text/javascript';b.innerText;b.onerror=function(){_vwo_code.finish();};d.getElementsByTagName('head')[0].appendChild(b);},init:function(){window.settings_timer=setTimeout(function () {_vwo_code.finish() },settings_tolerance);var a=d.createElement('style'),b=hide_element?hide_element+'{opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important;}':'',h=d.getElementsByTagName('head')[0];a.setAttribute('id','_vis_opt_path_hides');a.setAttribute('type','text/css');if(a.styleSheet)a.styleSheet.cssText=b;else a.appendChild(d.createTextNode(b));h.appendChild(a);this.load('https://dev.visualwebsiteoptimizer.com/j.php?a='+account_id+'&u='+encodeURIComponent(d.URL)+'&f='+(+is_spa)+'&r='+Math.random());return settings_timer; }};window._vwo_settings_timer = code.init(); return code; }());
</script>
<script type="text/javascript"> 
window.VWO = window.VWO || []; 
{% assign _vis_opt_revenue = total_price | divided_by: 100.0 %} 
window._vis_opt_queue = window._vis_opt_queue || []; 
window._vis_opt_queue.push(function() {_vis_opt_revenue_conversion('{{ _vis_opt_revenue }}');}); 
window.VWO.push(['track.revenueConversion','{{ _vis_opt_revenue }}']); 
var conversionGoals = (localStorage.getItem('fc_conversion_goals')||"").split(",");
conversionGoals.forEach((goal) => {
  window._vis_opt_queue.push(function() {_vis_opt_goal_conversion(goal);});
});
</script>
<!-- End VWO Async SmartCode -->
fried_egg.png

I like seeing marketing ideas I've never seen before

True or False? ??

fried_egg.png

Then you are in the right place.

Receive 1 unique conversions idea in your inbox every week. Interested?