Cruise Booking site

A guide to implement Criteo OneTag solution directly in your source code of your cruise booking site.

Overview

This tutorial will explain how to implement the Criteo OneTag solution directly in your source code of your cruise booking site. The Criteo OneTag should be placed in the header or body of each page on your site. Please implement the following 5 tags on your website:

  1. Homepage Tag

  2. Search Results Tag

  3. Product Tag

  4. Basket / Cart Tag

  5. Sales Tag

[[disclaimer-developer]]

Tags

Homepage Tag

Install the following tag on the homepage of your website. Example URL: {{homepageurl}}

Field Overview Example Syntax
email MD5 hashed email of the user 79054025255fb1a26e4bc422aef54eb4 String. Trimmed and lowercase 32 character, encoded in UTF-8

Structure

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

<!-- Criteo Homepage 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}}}, // You should never update this line
 { event: "setEmail", email: "##Email Address of user##" },
 { event: "setSiteType", type: deviceType},
 { event: "viewHome"});
</script>
<!-- END Criteo Home Page Tag -->

Example

<!-- Criteo Homepage 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}}}, // You should never update this line
 { event: "setEmail", email: "79054025255fb1a26e4bc422aef54eb4" },
 { event: "setSiteType", type: deviceType},
 { event: "viewHome"});
</script>
<!-- END Criteo Home Page Tag -->

Search Results Tag

Install the following tag on the search results page of your site. Example URL: {{homepageurl}}/category?id=categoryid1

Field Overview Example Syntax
email MD5 hashed email of the user 79054025255fb1a26e4bc422aef54eb4 String. Trimmed and lowercase 32 character, encoded in UTF-8
checkin_date Depature Date: Info "{{checkindate}}" "YYYY-MM-DD"
checkout_date Return Date: Info "{{checkoutdate}}" "YYYY-MM-DD"
nbra Number of Adult passenger 1 Integer
nbrc Number of Child passenger 0 Integer
nbri Number of Infant passenger 0 Integer
Cruise ID unique id of cruise CruiseID_1 Alphanumeric identifier of the cruise

Structure

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

<!-- Criteo Search Results 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}}}, // You should never update this line
 { event: "setEmail", email: "##Email Address of user##" },
 { event: "setSiteType", type: deviceType},
 { event: "viewSearch", checkin_date: "##YYYY-MM-DD##", checkout_date: "##YYYY-MM-DD##", nbra: ##Number of Adults##, nbrc: ##Number of Children##, nbri: ##Number of Infants##},
 { event: "viewList", item: ["##Cruise ID 1##", "##Cruise ID 2##", "##Cruise ID 3##"] });
</script>
<!-- END Criteo Search Results Tag -->

Example

<!-- Criteo Search Results 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}}}, // You should never update this line
 { event: "setEmail", email: "79054025255fb1a26e4bc422aef54eb4" },
 { event: "setSiteType", type: deviceType},
 { event: "viewSearch", checkin_date: "{{checkindate}}", checkout_date: "{{checkoutdate}}", nbra: 1, nbrc: 0, nbri: 0},
 { event: "viewList", item: ["CruiseID_1", "CruiseID_2", "CruiseID_3"] });
</script>
<!-- END Criteo Search Results Tag -->

Product Tag

Install the following tag on the product detail pages of your website. Example URL: {{homepageurl}}/product?id=productid_1

Field Overview Example Syntax
email MD5 hashed email of the user 79054025255fb1a26e4bc422aef54eb4 String. Trimmed and lowercase 32 character, encoded in UTF-8
checkin_date Depature Date: Info "{{checkindate}}" "YYYY-MM-DD"
checkout_date Return Date: Info "{{checkoutdate}}" "YYYY-MM-DD"
nbra Number of Adult passenger 1 Integer
nbrc Number of Child passenger 0 Integer
nbri Number of Infant passenger 0 Integer
Cruise ID unique id of cruise CruiseID_1 Alphanumeric identifier of the cruise

Structure

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

<!-- Criteo Product 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}}}, // You should never update this line
 { event: "setEmail", email: "##Email Address of user##" },
 { event: "setSiteType", type: deviceType},
 { event: "viewSearch", checkin_date: "##YYYY-MM-DD##", checkout_date: "##YYYY-MM-DD##", nbra: ##Number of Adults##, nbrc: ##Number of Children##, nbri: ##Number of Infants##},
 { event: "viewItem", item: "##Cruise ID##" });
</script>
<!-- END Criteo Product Tag -->

Example

<!-- Criteo Product 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}}}, // You should never update this line
 { event: "setEmail", email: "79054025255fb1a26e4bc422aef54eb4" },
 { event: "setSiteType", type: deviceType},
 { event: "viewSearch", checkin_date: "{{checkindate}}", checkout_date: "{{checkoutdate}}", nbra: 1, nbrc: 0, nbri: 0},
 { event: "viewItem", item: "CruiseID_1" });
</script>
<!-- END Criteo Product Tag -->

Basket/Cart Tag

Install the following tag on the cart or basket page of your website. Example URL: {{homepageurl}}/cart

Field Overview Example Syntax
email MD5 hashed email of the user 79054025255fb1a26e4bc422aef54eb4 String. Trimmed and lowercase 32 character, encoded in UTF-8
checkin_date Depature Date: Info "{{checkindate}}" "YYYY-MM-DD"
checkout_date Return Date: Info "{{checkoutdate}}" "YYYY-MM-DD"
nbra Number of Adult passenger 1 Integer
nbrc Number of Child passenger 0 Integer
nbri Number of Infant passenger 0 Integer
Cruise ID unique id of cruise CruiseID_1 Alphanumeric identifier of the cruise
price total cruise price 200.99 String or Integer, excluding the currency symbol
quantity static value 1 Integer

Structure

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

<!-- Criteo Basket/Cart 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}}}, // You should never update this line
 { event: "setEmail", email: "##Email Address of user##" },
 { event: "setSiteType", type: deviceType},
 { event: "viewSearch", checkin_date: "##YYYY-MM-DD##", checkout_date: "##YYYY-MM-DD##", nbra: ##Number of Adults##, nbrc: ##Number of Children##, nbri: ##Number of Infants##},
 { event: "viewBasket", item: [
    {id: "##Cruise ID 1##", price: ##Total Cruise Price##, quantity: 1 }
    //add a line for each additional line in the basket
]}
);
</script>
<!-- END Criteo Basket/Cart Tag -->

Example

<!-- Criteo Basket/Cart 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}}}, // You should never update this line
 { event: "setEmail", email: "79054025255fb1a26e4bc422aef54eb4" },
 { event: "setSiteType", type: deviceType},
 { event: "viewSearch", checkin_date: "{{checkindate}}", checkout_date: "{{checkoutdate}}", nbra: 1, nbrc: 0, nbri: 0},
 { event: "viewBasket", item: [
    {id: "CruiseID_1", price: 200.99, quantity: 1 }
    //add a line for each additional line in the basket
]}
);
</script>
<!-- END Criteo Basket/Cart Tag -->

Sales Tag

Install the following tag on the sales confirmation or Thank You page of your website. Example URL: {{homepageurl}}/thankyou

Field Overview Example Syntax
email MD5 hashed email of the user 79054025255fb1a26e4bc422aef54eb4 String. Trimmed and lowercase 32 character, encoded in UTF-8
checkin_date Depature Date: Info "{{checkindate}}" "YYYY-MM-DD"
checkout_date Return Date: Info "{{checkoutdate}}" "YYYY-MM-DD"
nbra Number of Adult passenger 1 Integer
nbrc Number of Child passenger 0 Integer
nbri Number of Infant passenger 0 Integer
Cruise ID unique id of cruise CruiseID_1 Alphanumeric identifier of the cruise
price total cruise price 200.99 String or Integer, excluding the currency symbol
quantity static value 1 Integer
Transaction ID confirmation or booking # 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}}}, // You should never update this line
 { event: "setEmail", email: "##Email Address of user##" },
 { event: "setSiteType", type: deviceType},
 { event: "viewSearch", checkin_date: "##YYYY-MM-DD##", checkout_date: "##YYYY-MM-DD##", nbra: ##Number of Adults##, nbrc: ##Number of Children##, nbri: ##Number of Infants##},
 { event: "trackTransaction", id: ##Transaction ID##, item: [
    {id: "##Cruise ID 1##", price: ##Total Cruise Price##, quantity: 1 }
    //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}}}, // You should never update this line
 { event: "setEmail", email: "79054025255fb1a26e4bc422aef54eb4" },
 { event: "setSiteType", type: deviceType},
 { event: "viewSearch", checkin_date: "{{checkindate}}", checkout_date: "{{checkoutdate}}", nbra: 1, nbrc: 0, nbri: 0},
 { event: "trackTransaction", id: 7654322, item: [
    {id: "CruiseID_1", price: 200.99, quantity: 1 }
    //add a line for each additional line in the basket
]}
);
</script>
<!-- END Criteo Sales Tag -->

Verification

[[accurate]]