This website works best with JavaScript enabled. Learn how to enable JavaScript.


Last updated

Integrating Shopify with VWO allows you to create and run VWO tests on your Shopify store. The end-to-end process of integrating Shopify with VWO involves the following steps:

  • Adding VWO Smart Code to your website pages
  • Implementing Revenue Tracking

Adding VWO Smart Code to Your Website Pages

  1. Sign in to your Shopify web store as an administrator.
  2. From the navigation bar, go to Sales channels > Online Store > Themes.shopify1
  3. On the Themes tab, click Customize theme.shopify2
  4. On the page that opens, select Theme options on the top of the page and then select Edit HTML/CSS.shopify3
  5. Go to the theme.liquid file on the customization panel and then add VWO Smart Code. VWO Smart Code will be added to all the pages (site-wide) in the selected theme. If your checkout process is on Shopify’s domain, make sure to enable multiple domain tracking in VWO. To learn how to run test across multiple domains, click here. shopify4

Implementing Revenue Tracking

  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. Copy the following JS code snippet to add to your website:
<script type="text/javascript">
window._vis_opt_queue = window._vis_opt_queue || [];
{% assign _vis_opt_revenue=total_price|money_without_currency %}
window._vis_opt_queue.push(function() {
_vis_opt_revenue_conversion('{{ _vis_opt_revenue }}');});
window.VWO = window.VWO || [];
window.VWO.push(['track.revenueConversion','{{ _vis_opt_revenue }}']);

Finally, add the revenue tracking code snippet (from step 4) in the Additional Content & Scripts field and click Save.

Note: If the revenue value is added as comma separated value without decimals, VWO by default replaces the comma (,) with a decimal. For example, if you enter the value as 1,500, the comma is replaced with decimal as 1.5. Please make sure to add the revenue value without the comma (,) such as 1500 or 1500.0.

Create a Standalone Revenue Tracking Goal

  1. Log in to your VWO dashboard and select Goal under Track from the menu.
  2. Click Create on the top right side of the dashboard.
  3. Select Track Revenue as the goal type to track.
  4. Enter the URL of the page where your successful transactions are recorded. Typically, the revenue value is available on the ‘thank­you’ page where successful transactions data is collected.
  1. To track revenue on multiple pages, click Advanced option to include and exclude pages, define URL pattern and regex.
  2. Select the segmentation option if you want to track revenue collection form specific visitor groups. To learn about segmentation, click here.
  3. Click Next to define the page audience. All unique visitors landing on this page are your goal audiences. Using Advanced option, you can define advanced pattern-matching options to include either a broad URL with wildcard entries or a specific URL.

Add Revenue Goal to a Specific Test

  1. Create an A/B, Personalization, Multivariate, or Split test using VWO.
  2. On the Goals page, select Track Revenue on, as the conversion goal type and enter the Shopify conversion page (thank you page) as the goal URL. For example, **XXXXXX*, where XXXXXX is the number of your store

Note: If your thank you page is on Shopify’s domain, you must enable the campaign to work across multiple domains as explained here.

Was this article helpful?

Thanks for your feedback!
Please email us at to tell us what you were looking for. We'll send the answer to your inbox.

Contact Us / Login