Pass Total Order Value to Sale / Conversion Tag

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 Address Email address in plain text (if allowed by the law in your country), sha256 hashed email address or MD5 hashed email address. 79054025255fb1a26e4bc422aef54eb4... - Plain text emails
- Sha256 and md5 hashed emails
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="//dynamic.criteo.com/js/ld/ld.js?a={{accountid}}"
  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 Address of User##" },
 { event: "setEmail", email: "##SHA256-hashed Email Address of User##", hash_method: "sha256" },
 { event: "setEmail", email: "##MD5-hashed Email Address of User##", hash_method: "md5" },
 { 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="//dynamic.criteo.com/js/ld/ld.js?a={{accountid}}"
  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", hash_method: "sha256" },
 { 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 -->