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
Create a Revenue goal
Create a Revenue goal from the Goal templates in your experiment.
Select Manual Revenue Tracking:
<script> window._conv_q = window._conv_q || ; window._conv_q.push(["pushRevenue",revenue,products_cnt,goal_id]); </script>
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:
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.