Signals & subscriptions

Discovery helps accommodation providers win over travelers in the planning phase of the traveler journey. The goal is to spark conversations with travelers deciding where to go next, increasing conversion and revenue with impact tracked in real-time.

Third-party integrations, analytics, logging, and many other use cases can be supported through Discovery signals and subscriptions to enrich these conversations in a way that’s good for both brand and traveler.

Set Signals allow you to push data into Discovery.

Get Signals allow you to retrieve data from Discovery.

Signal Subscriptions allow you to subscribe to real-time application signals

Discovery Signals

Experience Signals

Booking Engine Signals


Set Signals

When your website visitor chooses a category or page that can provide useful data and insight for Discovery, you can send a signal (via GTM, Javascript, etc.) so Discovery can respond with the appropriate context. This creates a seamless, cohesive experience as your visitor interacts with your website and Discovery.

Example

The sample code below passes signals from a specific website page to Discovery. In this example, if the visitor triggered Discovery from that page, the experience they see will be suited for planners looking for vacation rentals in Orlando.

(window.ftSignals = window.ftSignals || []).push({
  type: 'set',
  payload: {
    property: {
      property: 'my-prop',
      product: 'rentals'
    },
    location: {
      country: 'us',
      region: 'fl',
      city: 'orlando'
    }
  }
});


Get Signals

Discovery will learn valuable signals as your visitor progresses through their travel planning on our application. You may want to pass these signals to your website or booking engine so that those experiences respond better to your visitors' interactions.

Example

The sample code below passes insight that Discovery learned about a travel planner into the booking engine using the call “prePopulateBookingEngine” with the full plan object.

(window.ftSignals = window.ftSignals || []).push({
  type: 'get', 
  payload: {
    plan: prePopulateBookingEngine      
}});


Signal Subscriptions

Flip.to allows websites to subscribe and receive signals about user behavior in real time. To subscribe to a particular signal, simply push one of the supported signals into “window.ftSignals” and define the function to be called when the signal is triggered

Example 1: Discovery Open

The sample code below subscribes to the “onDiscoveryOpen” signal, which is triggered as soon as the user clicks one of the booking buttons to open Discovery. You can customize the code under “logDiscoveryOpen()” to log to your Analytics package each time Discovery is being opened on the website.

function logDiscoveryOpen(e) {
 //Enter code to log the fact that the current user just opened Discovery   
 //dataLayer.push({event:’Discovery.Open’, …e});
}
(window.ftSignals = window.ftSignals || []).push{
  type: 'subscribe', 
  payload: {
    onDiscoveryOpen: logDiscoveryOpen
}});

Example 2: Booking Engine Transfer

The sample code below subscribes to the “onDiscoveryTransfer” signal, which is triggered just before Discovery sends a user to the Booking Engine. You can customize the code under “logBookingEngineTransfer()” to log this event into your analytics package.

function logBookingEngineTransfer(e) {
 //Enter code to log the fact that the current user is being transferred to the booking engine
 //dataLayer.push({event:’Discovery.Transfer.Bookingengine’, …e});
}
(window.ftSignals = window.ftSignals || []).push{
  type: 'subscribe', 
  payload: {
    onDiscoveryTransfer: logBookingEngineTransfer
}});

Discovery Signals

Discovery can also send data for specific events that happen during our traveler conversations. Subscribing to this data may be useful for analytics and to understand planner behaviors.

Event Data

Each subscription notification call will pass the following data to its subscribers:

Example

source: "a99a9b5e-b551-41aa-b946-19350ceff89e"
experiment: true
mode: "unveil"
plan:
checkinDate: Wed Dec 15 2021 00:00:00 GMT-0500 (Eastern Standard Time) {}
checkoutDate: Sat Dec 18 2021 00:00:00 GMT-0500 (Eastern Standard Time) {}
adults: 2
children: 0
promoCode: holiday
property: {displayName: "Test Hotel", slug: "test-hotel", id: "5fd181b8-61c7-4194-bb78-566c1ca7de11", code: "10000"}

Experience Signals

Discovery can also send data for specific events that happen during our traveler conversations. Subscribing to this data may be useful for analytics and to understand planner behaviors.

Event Data

Each subscription notification call will pass the following data to its subscribers:

Example

{
    "uuid": "95B7F6E7-50E4-4749-9A5B-2DE28E6BB624",
    "languageCode":"en",
    "name": "Madagascar the Musical",
    "isRecurring": false,
    "recurringStartDate": "2023-04-07T19:00:00",
    "recurringEndDate": "2023-04-07T00:00:00",
    "occurrences": [{ "startDate": "2023-04-07T00:00:00", "endDate": "2023-04-07T00:00:00" }],
    "venue": { "name": "Au-Rene Theater at the Broward Center"},
    "tags": ["performance_show", "theatre", "music", "kid_friendly"]
}


Booking Engine Signals

After a website visitor submits their name and email address, Discovery sends them to the booking engine. Flip.to allows booking engines to subscribe and receive signals about each travel planner.

Example

The sample code below provides the travel planner's first name and email address to the booking engine, which can be used to populate form fields for example.

<script>

// -------------------------
// Subscribing to the signal
// -------------------------
(ftDatalayer = ftDatalayer || []).push({type: 'ft-get-signal', payload: {
key: 'planInfo',
value: OnDiscoveryPlanInfo
}});

// -------------------------------------------------------
// A sample function getting the planner's details for use
// -------------------------------------------------------
function OnDiscoveryPlanInfo(planInfo){
try
{
  var planner = {
  email: planInfo.email,
  firstName: planInfo.first};

// Enter your code here to use the planner's first name and email 

}
catch(e){}
}
</script>

Last updated