The Track Revenue goal allows you to track revenue from purchases and other transactions on your website by attributing the revenue amount for every valid and successful transaction. After you set up the revenue goal, VWO generates a revenue tracking code that you can add to your website, usually on the purchase confirmation page.
Using VWO, you can create two types of revenue codes, one as part of your A/B and Split Tests, and the other to track revenue data for research. The revenue code generated for each type is different. Please make sure to use the appropriate code. This article explains the setup process and code for goal tracking for research. To learn how to set up revenue tracking for Tests, click here.
Follow these steps to track revenue generation for a test:
- On the New Goal page, select track revenue on and type the URL of the goal page where you will have access to the revenue amount of each successful transaction. It is typically available on the thank you page after a successful payment/transaction.
- On the 'thank you' page, copy and paste the following revenue code and pass the value equal to the total revenue generated by the visitor. Consider that a visitor purchased two items, one for $15 and the other for $7. Now, enter the output value like 22 in the variable. If the visitor bought only one item (for $10), enter the output value as 10. You don't need to be concerned about which variation the visitor saw or what individual items did the visitor buy. You just need to output the total revenue and VWO will take care of the rest. Consider another example: If the page where we redirect after successful plan purchase is http://visualwebsiteoptimizer.com/thank-you, then all we need to do is to copy-paste default VWO code there and also output following code:
window.VWO = window.VWO || ;
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.