Trip Packages Booking site

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

Overview

This tutorial will explain how to implement the Criteo OneTag solution directly in your source code of your trip packages 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"
Trip Packages ID unique id of trip packages Trip PackagesID_1 Alphanumeric identifier of the trip packages

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##" },
 { event: "viewList", item: ["##Trip Packages ID 1##", "##Trip Packages ID 2##", "##Trip Packages 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}}" },
 { event: "viewList", item: ["Trip PackagesID_1", "Trip PackagesID_2", "Trip PackagesID_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"
Trip Packages ID unique id of trip packages Trip PackagesID_1 Alphanumeric identifier of the trip packages

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##" },
 { event: "viewItem", item: "##Trip Packages 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}}" },
 { event: "viewItem", item: "Trip PackagesID_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"
Trip Packages ID unique id of trip packages Trip PackagesID_1 Alphanumeric identifier of the trip packages
price total trip packages 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##" },
 { event: "viewBasket", item: [
    {id: "##Trip Packages ID 1##", price: ##Total Trip 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}}" },
 { event: "viewBasket", item: [
    {id: "Trip PackagesID_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"
Trip Packages ID unique id of trip packages Trip PackagesID_1 Alphanumeric identifier of the trip packages
price total trip packages 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##" },
 { event: "trackTransaction", id: ##Transaction ID##, item: [
    {id: "##Trip Packages ID 1##", price: ##Total Trip 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}}" },
 { event: "trackTransaction", id: 7654322, item: [
    {id: "Trip PackagesID_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]]