Hotel Booking site

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

Overview

This tutorial will explain how to implement the Criteo OneTag solution directly in your source code of your hotel 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
nbrr Number of Rooms 1 Integer
Hotel ID unique id of hotel HotelID_1 Alphanumeric identifier of the hotel

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##, nbrr: ##Number of Rooms##},
 { event: "viewList", item: ["##Hotel ID 1##", "##Hotel ID 2##", "##Hotel 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, nbrr: 1},
 { event: "viewList", item: ["HotelID_1", "HotelID_2", "HotelID_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
nbrr Number of Rooms 1 Integer
Hotel ID unique id of hotel HotelID_1 Alphanumeric identifier of the hotel

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##, nbrr: ##Number of Rooms##},
 { event: "viewItem", item: "##Hotel 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, nbrr: 1},
 { event: "viewItem", item: "HotelID_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
nbrr Number of Rooms 1 Integer
Hotel ID unique id of hotel HotelID_1 Alphanumeric identifier of the hotel
price total hotel 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##, nbrr: ##Number of Rooms##},
 { event: "viewBasket", item: [
    {id: "##Hotel ID 1##", price: ##Hotel Unit 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, nbrr: 1},
 { event: "viewBasket", item: [
    {id: "HotelID_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
nbrr Number of Rooms 1 Integer
Hotel ID unique id of hotel HotelID_1 Alphanumeric identifier of the hotel
price total hotel 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##, nbrr: ##Number of Rooms##},
 { event: "trackTransaction", id: ##Transaction ID##, item: [
    {id: "##Hotel ID 1##", price: ##Hotel Unit 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, nbrr: 1},
 { event: "trackTransaction", id: 7654322, item: [
    {id: "HotelID_1", price: 200.99, quantity: 1 }
    //add a line for each additional line in the basket
]}
);
</script>
<!-- END Criteo Sales Tag -->

OneTag 2.0

[[cname]]

Verification

[[accurate]]