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.

Set SignalWhat does this change?

PLAN

adults

Default adults.

children

Default children.

endDate

Default departure date.

email

Planner email address.

first

Planner first name.

promoCode

Default promo/discount/group code.

rooms

Default number of rooms.

startDate

Default arrival date.

PROPERTY

property

Default plan location.

product

Default product. Requires property.

LOCATION

country

Default country for map navigation.

region

Default region for map navigation. Requires country.

city

Default city for map navigation. Requires region.

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.

Get SignalWhat does this return?

plan

Callback is called with an object matching the following schema: {

"$schema": "http://json-schema.org/draft-04/schema#",

"type": "object",

"properties": {

"LanguageCode": {

"type": "string"

},

"Beds": {

"type": "integer"

},

"Rooms": {

"type": "integer"

},

"Children": {

"type": "integer"

},

"Adults": {

"type": "integer"

},

"Email": {

"type": "string"

},

"PlannerName": {

"type": "string"

},

"StartDate": {

"type": "string"

},

"EndDate": {

"type": "string"

},

"DestinationName": {

"type": "string"

},

"NamedRangeTitle": {

"type": "string"

}, "PropertyPhotoUrl": {

"type": "string"

},

"PropertyName": {

"type": "string"

}

},

"required": [

"LanguageCode",

"Email",

"PlannerName",

"StartDate",

"EndDate",

"DestinationName",

"NamedRangeTitle",

"PropertyPhotoUrl",

"PropertyName"

]

}

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.

SubscriptionWhen event fires

onDiscoveryLoad

Upon Discovery script loading on the page.

onDiscoveryExperimentSet

Upon experiment (Flip.to or Control) being set for a new user.

onDiscoveryOpen

When the user triggers the opening of a Discovery experience (by clicking the booking button for instance).

onDiscoveryPlanChange

When user plan information changes (changing dates etc).

onDiscoveryTransfer

When the user is being sent to the booking engine.

Event Data

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

AttributeDescription

source

The internal Flip.to Discovery ID, as a string (GUID).

experiment

Indicates which experiment the user falls under. Set to 'true' for Discovery.

Set to 'false' for the hotel’s own booking widget.

mode

Optional Context description for the event, which varies by event type.

Supported values are as follows:

onDiscoveryOpen

  • planner-flow

  • returning-user

onDiscoveryTransfer

  • unveil (name/email revealed)

  • skip (Discovery complete without unveiling)

  • bypass (Discovery not shown)

  • continue (user already has a plan)

plan

Object to include all relevant information for the user's intended stay as follows:

checkinDate

Check-in date, as a date object.

checkoutDate

Check-out date, as a date object.

adults

Number of adults, if specified.

children

Number of children, if specified.

promoCode

The promo code, if any, as a string.

property

Object with data of current property. This includes the following attributes:

displayName

The property’s name, as a string.

slug

The property’s unique slug, as a string.

code

The property’s booking engine code, as a string.

id

The property’s internal id, as a string (GUID).

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.

SubscriptionWhen event fires

OnDiscoveryExperienceOpen

Upon user clicking to view a particular experience

Event Data

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

AttributeDescription

uuid

The internal Flip.to experienceID, as a string (GUID).

languageCode

The language code the user is currently using to view the event.

name

The experience name.

isRecurring

Indicates whether experience is recurring.

recurringStartDate

The start date of recurring experiences.

recurringStartDate

The end date of recurring experiences.

occurrences

The occurrences of this experience around the time of booking. This will not provide dates that goes beyond more than 1 week before or after the user intended check-in and/or check-out dates

venue

The venue name in which experience is taking place.

tags

An array of all tags that are associated with the experience. Tags are keywords to define the events, and are always defined in English.

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