Tracking Revenue with Google Analytics
If you paste the Convert Experiments code right after the </title> tag and you use the standard async universal Google Analytics (GA) code, we will automatically connect e-commerce revenue tracking of GA to all your tests; there is no need to install anything, this works out of the box for all clients.
Creating a Revenue Goal with Google Analytics
Create a revenue goal from the Goal presets in your experiment.
Setting Up Revenue Tracking
But if you don’t want to use Google Analytics for revenue tracking or you cannot use it as it's not implemented through the standard tracking code, we have another way you can send a conversion, revenue and the amount of products ordered by the client
1) First, create a revenue goal. You can do this from the "Experience Summary" of your experiment:
Make sure that in the following step you fill in a dummy URL that does not match a URL on your site. For example, "http://domain.com/dummy.html".
After you've saved the goal, go edit it and you will find the JS code below which you need to copy and paste anywhere in the page (after the main code) on your website to send revenue and ordered products count to our system with the appropriate fields mapped to variables on your e-commerce system.
<script> window['_conv_q'] = window['_conv_q'] || ; window['_conv_q'].push(["sendRevenue","transaction_id",revenue,products_cnt,goal_id]); </script>
In the above code you need to replace the following fields with the actual values:
- Transaction ID: transaction_id
- Revenue: revenue using 123.45 (dot as cent divider)
- Product Count (number of products in the cart): products_cnt
- Parameter goal_id is automatically field with the ID of the goal you are editing. You can use the revenue tracking code above together with any goal ID from your project; the revenue data will be storred connected to that goal and a conversion will be recorded for that goal
<script> window['_conv_q'] = window['_conv_q'] || ; window['_conv_q'].push(["sendRevenue","transaction_id",revenue,products_cnt,goal_id,"force_multiple"]); </script>
Then, after saving it, if you edit it again you'll get a triggering code:
Locate the number mentioned in the screenshot above. That is your goal ID that you want to use together with the revenue tracking code.
If you already have a goal created that you would like to use, you can also find the goal ID by going to the goals overview and looking under the details section for the specific goal:
This will attach the right revenue (two decimal value of the transaction) and amount of products to the variations you were testing and when the goal-page is the same as the one where the revenue is tracked you will even get two extra tabs in the test results main goal besides the conversion rate (see below the conversion rate, revenue and order items).
Conversion Rate Report
Product Count (ordered)
If cross domain tracking does not work, please check the following article.