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
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 Signal | What does this change? |
---|---|
PLAN | |
adults | Default adults. |
children | Default children. |
endDate | Default departure date. |
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.
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 Signal | What 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.
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.
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.
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.
Subscription | When 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:
Attribute | Description |
---|---|
source | The internal Flip.to Discovery ID, as a string (GUID). |
experiment | Indicates which experiment the user falls under.
Set to Set to |
mode | Optional Context description for the event, which varies by event type. Supported values are as follows: onDiscoveryOpen
onDiscoveryTransfer
|
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
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.
Subscription | When 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:
Attribute | Description |
---|---|
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
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.
Last updated