Sale Goal

Overview

The Sale goal tracks:

  • How many visitors who saw the experiment made a purchase, reaching your funnel's thank-you page.

  • The average order value.

  • Revenue per visitor, calculated against the number of views the Control or Variation received.

  • Total revenue - the sum of all transactions from visitors who saw the Control or Variation.

Note

This article covers non-Shopify stores. If your website runs on Shopify, see Track Sales on Shopify (Custom Pixel) instead.

Implementing the Sale goal

  1. From the left menu, click Advanced, then Goals.

  2. Find the Sale goal and copy its snippet from there.


    ​
  3. Paste it on your website's Thank You page, somewhere between <body> and </body>, wrapped in <script> tags:

<!-- 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 -->

Replace VALUE with the JavaScript variable returning the cart's total revenue, and TRANSACTION_ID with the variable returning the transaction ID.

Warning

The main tracking code must be installed in the <head> of your thank-you page, right after the opening <head> tag. Without it, the Sale goal won't send any data to your experiment statistics.

Tracking specific products (SKUs)

To track which products were purchased, add a skus key to the code:

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

Replace SKU1 and SKU2 with the actual SKUs of the purchased products - you can list one or several.

Note

Adding SKUs only affects what you can filter and see in your CSV export - it does not change which sales are tracked. A sale without any SKUs attached is still fully counted; the SKU field simply lets you later see which specific products were part of that transaction.

Multi-currency support

If your store sells in multiple currencies, Explore can automatically convert every transaction into your website's Base Currency for consistent reporting.

Setting your Base Currency

Choose it when adding a new website to your account. It also determines which currency is shown in that website's experiment reports.

Note

If no Base Currency is selected, it defaults to USD. Changing it later isn't possible from the platform - contact Omniconvert support via the chat widget to have it updated.

Adding the currency parameter

Add a currency key to your Sale goal snippet:

<!– start Omniconvert conversion goal code –>
<script> window._mktz = window._mktz || [];
window._mktz.push([‘_Goal’, ‘sale’, ‘VALUE‘, { transaction: ‘TRANSACTION_ID‘, ‘currency’: ‘EUR‘ }]); </script>
<!– end Omniconvert conversion goal code –>

You must replace EUR with the name of the base currency you want all of the transactions to be converted into.

Warning

If currency is not provided, Explore assumes the value is already in your Base Currency and performs no conversion.

Testing your implementation

  1. Place a test order.

  2. Once you reach the Thank You page, right-click and select View page source.

  3. Find where the Sale goal code was implemented and confirm it shows the correct purchase amount.

Note

If placing a test order isn't practical, wait for some time after implementing the code and check the Advanced → Goals page (see QA a Goal). An increasing Goal Count confirms conversions are being received - but it won't confirm the transaction values are correct. To verify that, you'd need to run an A/A test and compare the resulting revenue figures against your actual sales data.

CSV export and timestamps

Sale goal data can be exported as CSV from your experiment report. See Read an Experiment Report for the full export process.

Note

Timestamps in the CSV export are in the server's timezone (Amsterdam) by default. If you've configured a Display Timezone in Configure Website Settings, the export uses that timezone instead.

Good to know

A Custom Goal can be used instead of Sale for lead-generation websites, to assign a value to each lead rather than a purchase. Insert the goal code on your lead form's thank-you page, and set VALUE to whatever a lead is worth to you (e.g. 5, 10, or 100). See Custom Goal.

Updated