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.
Discovery Actions allow you to make Discovery do something.
Discovery Behaviors allow you to customize and configure Discovery behavior.
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.
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.
beds
Default number of beds.
startDate
Default arrival date.
language
Sets the Discovery language (if supported).
PROPERTY
property
Default plan location.
product
Default product. Requires property.
linkerValue
Passes an analytics linker value to associate the current session with a group booking or property code. This is typically used when a visitor arrives via a direct link that contains tracking parameters.
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.
plan
Callback is called with an object matching the following schema:
experiment
Returns the current experiment flag for the user. The callback receives a boolean:
trueif the user is in the Discovery group.falseif user is in the Control group.
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.
Discovery Actions
Action signals allow you to programmatically control the Discovery experience from your website. You can open, close, or trigger Discovery, track custom analytics events, and more.
openDiscovery
Opens the Discovery experience.
closeDiscovery
Closes the Discovery experience.
revokeDiscovery
Removes Discovery from the page entirely.
triggerDiscovery
Triggers the Discovery flow (evaluates experiment and entry conditions).
bookingBarButtonClicked
Simulates a booking bar button click.
setExperimentFlag
Overrides the experiment flag for the current user.
trackAnalyticsEvent
Fires a custom analytics event into Discovery's analytics pipeline.
Example 1: Open Discovery
The sample code below programmatically opens the Discovery experience on the page.
Example 2: Track a Custom Analytics Event
The sample code below fires a custom analytics event through Discovery's analytics pipeline, which will be forwarded to all connected analytics providers (GTM, Adobe, etc.).
Example 3: Override Experiment Flag
The sample code below forces the current user into (or out of) the Discovery experiment.
Discovery Behaviors
Behavior signals allow you to customize how Discovery handles key interactions such as booking engine transfers and page context resolution. Behaviors are passed as part of a set signal and accept a static value, a promise, or a callback function.
bookingEngineTransfer
Customizes how Discovery navigates the user to the booking engine.
discoveryPageContextSetter
Dynamically provides property and location context for the current page.
bookingEngineTransfer
Controls the booking engine transfer behavior.
Accepts an ExternalNavigationConfig object with the following options:
methodHTTP method for the transfer.
Supported values:
GET,POST
queryParametersAdditional query parameters to append to the booking engine URL
fragmentParametersAdditional query parameters to append to the booking engine URL.Additional fragment (hash) parameters to append to the booking engine URL.
targetWindow target for navigation.
Supported values:
_self,_blank,_parent,_top
customHandlerA function that receives the full booking engine URL DTO for fully custom navigation handling.
Can return
void, a URL string, or a promise.
Example 1: Add Query Parameters to Booking Engine Transfer
The sample code below appends custom tracking parameters to every booking engine transfer URL.
Example 2: Open Booking Engine in a New Tab
Example 3: Custom Booking Engine Transfer Handler
The sample code below provides a custom handler that intercepts the booking engine transfer entirely, allowing you to construct or redirect to a custom URL.
Example 4: Dynamic Booking Engine Transfer with a Callback
Behaviors also accept a callback function, which is called at transfer time. This is useful when the configuration depends on runtime state.
Example 5: Page Context Setter
Allows your website to dynamically provide property and location context to Discovery based on the current page. This is useful when page context cannot be determined from a single static signal — for example, on single-page applications where the URL changes without a full page reload.
The callback receives no arguments and should return an object with property and/or location.
Setting Static Page Context:
Dynamic Page Context with a Callback: The sample code below uses a callback to resolve the current page context at the time Discovery needs it, which is useful for single page applications or pages where the context changes dynamically.
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.
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.
onDiscoveryBootstrap
When the Discovery application has fully bootstrapped and is ready to receive signals. This is useful when you need to ensure Discovery is initialized before pushing signals.
Event Data
Each subscription notification call will pass the following data to its subscribers:
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-flowUser opened Discovery through the standard planner flow (e.g. clicking a booking button).
returning-userUser is a returning visitor who previously interacted with Discovery.
discovery-routerUser opened Discovery through the multi-property router flow.
onDiscoveryTransfer
unveilName and email revealed
skipDiscovery complete without unveiling
bypassDiscovery not shown
continueUuser 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
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.
OnDiscoveryExperienceOpen
Upon user clicking to view a particular experience
Event Data
Each subscription notification call will pass the following data to its subscribers:
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