Sign in

Welcome to our Support Center

Get help with integration and live campaigns

Welcome to our Support Center. Get help with integration and live campaigns

Travel Parameter viewSearch Event

Overview

If your website contains dates for a booking or for renting some product, then the viewSearch event can be beneficial to the performance of your campaign. Implementing the viewSearch event on your site allows Criteo to understand better the users interest in booking/renting the desired trip/product.  

viewSearch event

The viewSearch event collects both a start date and an end date. These dates help the Criteo Engine better recommend products at the correct time before purchase. It also provides the information needed so that we do not serve irrelevant information to users who have already passed the dates of interest. 

How to implement

You simply need to add the following event to the Criteo Onetag on any page where dates are available, and then dynamically send the dates in the following format: yyyy-MM-dd

 { event: "viewSearch", checkin_date: "yyyy-MM-dd", checkout_date: "yyyy-MM-dd"}

So if the viewSearch event were implemented in the Basket tag, the tag would look like this:

<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 || [];
window.criteo_q.push(
{ event: "setAccount", account: YOUR_UNIQUE_ACCOUNT_ID },
{ event: "setSiteType", type: "d" },
{ event: "setEmail", email: "criteotest@test.com" }, { event: "viewSearch", checkin_date: "2016-08-12", checkout_date: "2016-08-18"},
{ event: "viewBasket", item: [ { id: "FLIGHT_ID1", price: 299.99, quantity: 1 }

]});
</script>
Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk