Integrate Convert Experiences with WooCommerce

Convert-WooCommerce Integration

Integration of WooCommerce with Convert Experiences will help you to import Convert data into your WooCommerce ecommerce platform.

For each experiment, the integration can pass along the revenue information from the conversion page.

Add Tracking Code Snippets

Make sure the Convert tracking code and the WooCommerce are installed on your Wordpress site/pages.

Create a Revenue goal

Create a Revenue goal from the Goal templates in your experiment.

Select Manual Revenue Tracking:

After you have saved the goal, go edit it and you will find the JavaScript code below. You will need to copy and paste this script anywhere on the page (after the main Convert tracking code) of your website to send revenue and ordered products count to our system with the appropriate fields mapped to variables on your e-commerce system.

    window._conv_q = window._conv_q || [];

In the above code you need to replace the following fields with the actual values:

  • Revenue: revenue using 123.45 (dot as cent divider)
  • Product Count (number of products in the cart): products_cnt
  • Parameter goal_id is automatically filled in with the ID of the goal once you have saved the goal.*

Add Tracking Code to the Order Received Page

You need to be able to put some tracking code on the page users go to after checking out so you can track the orders. You might have noticed that WooCommerce does not have a specific page for this. Rather, it is just the checkout page with a custom endpoint.

So to add something specifically to this page, we will need to hook onto a hook found on just the thank-you page. For this, we will be using the woocommerce_thankyou hook found in the checkout/thankyou.php template.

The completed snippet will look like this and needs to be added in the Wordpress functions.php file:

See the Pen WooCommerce by (@gcrewe) on CodePen.

Make sure you replace the Convert script with your own ID and the goal ID you found on the previous step.

View Revenue Data in Convert

In order to see the revenue data sent, you must login into your Convert account and go to your Reports. A new column for revenue data will be added.


Need assistance? Start a conversation with our Support Team.

Reliably Convert More Site Visitors, Even If Everything Else is Changing in Your Business.

✓ No Credit Card  ✓ Easy Set-Up  ✓ Access All Features