Capture total order discounts

Overview

This guide will walk you through the way to send Criteo the correct order amount in the conversion tag when you have total order discounts. You'll accomplish this by adding an 'ordertotal' product while setting the price for the other items to 0.

Sales Tag

Install the following tag on the sales confirmation or Thank You page of your website. Example URL: {{homepageurl}}/thankyou Please replace the current sales tag if you already have one on site.

Field Overview Example Syntax
Email Plain-text or MD5 Hash 79054025255fb1a26e4bc422aef54eb4 String. Trimmed and lowercase 32 character, encoded in UTF-8
Product Id Unique ID of Product ProductID_1 String
Total Order Price The total amount of the order 200.99 String or Integer, excluding the currency symbol
Quantity Number of units added 2 Integer
Transaction Id Confirmation or Order # 7654322 Integer. Unique ID

Structure

Dynamically replace fields surrounded by ## with users information. See Example

<!-- Criteo Sales Tag -->
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q.push(
 { event: "setAccount", account: {{accountid}}},
 { event: "setEmail", email: "##Email##" },
 { event: "setSiteType", type: deviceType},
 { event: "trackTransaction", id: ##Transaction Id##, item: [
    {id: "ordertotal", price: ##Total Order Price##, quantity: 1 },
    {id: "##Product ID##", price: 0, quantity: ##Quantity## }
    //add a line for each additional line in the basket
]}
);
</script> 
<!-- END Criteo Sales Tag -->

Example

<!-- Criteo Sales Tag -->
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q.push(
 { event: "setAccount", account: {{accountid}}},
 { event: "setEmail", email: "79054025255fb1a26e4bc422aef54eb4" },
 { event: "setSiteType", type: deviceType},
 { event: "trackTransaction", id: 7654322, item: [
    {id: "ordertotal", price: 200.99, quantity: 1 },
    {id: "ProductID_1", price: 0, quantity: 2 },
    {id: "ProductID_2", price: 0, quantity: 1 }
    //add a line for each additional line in the basket
]}
);
</script> 
<!-- END Criteo Sales Tag -->