How to properly install the Sales goal

Back

The default Sales goal available in the platform is a custom goal that shows you:

  1. How many of your visitors who saw the experiment have bought something by reaching the thank you page of your selling funnel.
  2. The average goal value amount.
  3. The revenue per visitor calculated taking into consideration the number of views the control or the variation has.
  4. The revenue – it is the total amount of transactions made by visitors who saw the control or the variation.

To receive and visualize the statistics of the Sales goal accurately,  you must set the details of your website accordingly.

To do that, go to your dashboard, click on your website’s name on the right and after on ‘Edit website‘.

omniconvert edit website

Once you see the ‘Edit website‘ window, change the ‘Website type’ to Online shop, select your ‘Domain of activity’ ( select other if you can’t find yours ), after that enter the code of your ‘Currency’ and the amount of ‘Visitors per month’ your website has.
In the end, you have a checkbox that asks you if you want to ‘Send experiments data to Google Analytics as events’. If you’re going to receive data into your Google Analytics account, check the box and click Save.

You can also check it later if you can’t decide or if you don’t have Analytics installed on your website.

omniconvert website settings

After you’ve set up the details of your website correctly and clicked on save, you will be able to see all the data regarding Revenue into your experiments’ statistics page.

omniconvert experiment performance

Now that everything is set up correctly into the dashboard, we move towards the installation of the Sales goal on your website.

To start, go to the ‘Advanced‘ category on the left menu and select ‘Goals. There, copy the ‘Integration (Javascript)’ code that appears on the same line:

omniconvert advanced goals

Next, go to your thank you page and paste it somewhere between the <body>(your thank you page code will be here) </body> tags using <script> tag before and </script> after. Just like below:

<!-- start Omniconvert conversion goal code -->
<script>
window._mktz = window._mktz || [];
window._mktz.push(['_Goal', 'sale', 'VALUE', { transaction: 'TRANSACTION_ID' }]);
</script>

<!-- end Omniconvert conversion goal code -->

Attention! – You must replace VALUE with the JavaScript variable that returns the total revenue of your cart and TRANSACTION_ID with the JavaScript variable that returns the transaction id.

In the picture below, you can see an example of how one of our customers changed the Value with the proper variable that returns the total amount from the cart.  Please be aware that you must use your own variable, not the one presented below in the example.

omniconvert sale tracking code

Be sure that you’ve installed the Omniconvert main tracking code into the header of your thank you page right after the <head> tag. Otherwise, the Sale goal will not send data to the statistics of your experiments.

Now that the Sale goal is in place on your thank you page, and the main tracking code is between the <head></head> tags, you can place a test order that will later be deleted.

After you’ve placed the order and you’ve reached the thank you page, don’t exit but right-click somewhere on the page, select ‘View page source‘, scroll to where the Sale goal has been implemented, and check it out.  If the implementation has been made correctly, it must show the amount of the product you’ve bought.

Like in the example below, where we bought a product worth $69.

omniconvert sale tracking code example

Hint: A custom goal can be used for lead collecting websites to see the value of the visitors that converted into a lead. To do that, insert the goal code into the thank you page of the lead collecting form, and change ‘Value’ with the how much does a lead worth to you, 5,10, 100 dollars/euros, etc.

Shopping Basket