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

Shopify

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.shopify4As the revenue goal is tracked on Shopify’s domain, you must enable multiple domain tracking in VWO. Click here to learn how how to run test across multiple domains.

Implementing Revenue Tracking

Using VWO, you set up your website revenue tracking goals in two different ways:

  • Add revenue goal to a specific test
  • Create a standalone revenue tracking goal

Add revenue goal to a specific test

  1. Create an A/B, 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, *checkout.shopify.com*XXXXXX*, where XXXXXX is the number of your store.
  3. After you create the test, 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 }}');
    });
    </script>
  4. Next, sign in to your Shopify web store as an administrator.
  5. From the navigation bar, click Settings.
  6. On the Settings page, click Checkout.
  7. Add the revenue tracking code snippet (from step 3) in the Additional Content & Scripts field.shopify5
  8. To implement the changes, click Save.

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.
  5. To track revenue on multiple pages, click Advanced option to include and exclude pages, define URL pattern and regex.
  6. Select the segmentation option if you want to track revenue collection form specific visitor groups. To learn about segmentation, click here.
  7. 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. 
  8. After you create the goal, copy the following JavaScript code snippet:
    <script>
    window.VWO = window.VWO || [];
    {% assign _vis_opt_revenue = total_price | money_without_currency %}
    window.VWO.push(['track.revenueConversion','{{ _vis_opt_revenue }}']);
    </script>
  9. Next, sign in to Shopify web store as an administrator.
  10. From the navigation bar, click Settings.
  11. On the Settings page, click Checkout.
  12. Add the revenue tracking code snippet (from step 8) in the Additional Content & Scripts field.
  13. To implement the changes, click Save.

Was this article helpful?

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

Contact Us / Login