The Revenue goal typically tracks the revenue generated each time a customer visits your website. For example, consider an eCommerce site where users make purchases. You can track the revenue generated after the users submit the billing detail form successfully. To determine the revenue earned, you can simply define a revenue tracking goal for each successful submission of the billing form.
Using VWO capabilities, you can create two types of revenue goals, one for VWO Insights and the other for VWO Testing. The revenue code generated for each type is different. Please make sure to use the appropriate code.
To learn setting up goals in VWO Testing, refer to How to Create a Goal in VWO Testing?
If you don't want to hardcode the code snippets on your website, you can choose to work with any of the following alternatives: Tag managers or the Pre-campaign JS option of VWO Editor. To know more about this, refer to How to Add Pre/Post-Campaign JS/CSS.
- On the New Goal page, select track revenue on and type the URL of the goal page where you have access to the revenue amount of each successful transaction. It is typically available on the thank you page after a successful payment/transaction. Also, in the Current revenue per visitor (in USD) field, enter the current revenue per visitor for the pages that are part of the current test. This helps you estimate the revenue per visitor by analyzing revenue data from other VWO studies, GA, or other analytics tools.
- On the 'thank you' page, copy and paste the revenue code generated by VWO after you have finished your Revenue Goal set up 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 the visitor buys. 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 a successful plan purchase is http://visualwebsiteoptimizer.com/thank-you, then all we need to do is to copy-paste the default VWO code there and also output the following code:
For VWO Testing:
For VWO Insights:NOTE: In the above code snippet, Replace “REPLACE_THIS_WITH_ACTUAL_REVENUE" with a value OR a revenue variable that is available on the page after the transaction happens. If the revenue value is added as a 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 a decimal as 1.5. Please make sure to add the revenue value without the comma (,) such as 1500 or 1500.0.
Add Multiple Revenue Goals on a Single Page
By default, VWO allows creating one revenue tracking goal for each test. However, to track multiple revenue goals on a single page, such as a thank you or confirmation page, follow these steps to create a queue functionality:
- Remove var _vis_opt_revenue = “REPLACE THIS WITH ACTUAL VALUE”; from the code in the test pages.
- Use the queue functionality to trigger conversions for the two revenue goals so that you can add the code.
This is how the revenue tracking code snippet looks like:
Locate your Goal ID in VWO
To locate your goal ID, perform these:
- Select the test for which you want to locate the goal ID.
- From the SUMMARY Page, go to the SETTINGS > GOALS tab.
- The Goal page will display all the goals you have created for the test with a Goal ID assigned to each goal created.
If you need information regarding how much was the total sales made for a specific test, you can integrate the reports with your GA/UA account and then compare the data shown in VWO – unique conversions, vs in GA, total sales made by the visitor who became a part of the test.