This guide assumes you have a catalog with your travel inventory ready, and have set up the required travel events on your website and/or in your mobile app, and have associated your catalog with your event sources.
As of September 20, 2018 we will not support subtype after v3.0 of Marketing API for custom audiences for websites, apps, engagement custom audiences, and audiences from offline conversion data. The one exception is that subtype will still be supported for engagement custom audiences for video.
Create a travel audience in two steps:
Besides associating your event sources with your catalog, you must also create an event source group. Event source groups are used to fill audiences.
curl \
-F 'name=My Travel Company Events' \
-F 'event_sources=["<PIXEL_ID>","<APP_ID>"]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<BUSINESS_ID>/event_source_groups
You must then share this event source group out to any ad accounts that wish to create an audience backed by it. Again, this is done by making an HTTP POST call:
curl \
-F 'accounts=["<ACCOUNT_ID_WITHOUT_ACT>"]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<EVENT_SOURCE_GROUP_ID>/shared_accounts
At this point you should have your user signal (i.e. pixel and/or app events) set-up and associated with an event source group and your travel catalog(s).
To target people whom have shown explicit travel intent, you must create a dynamic travel audience of people who you would like to serve the ad to. You can include and exclude people based on their travel intent signals. You can also apply additional rule-based filters on top of the events like with Website Custom Audiences. The flight_set_id field is required for a dynamic flight audience. For hotel and destination audiences, you are not required to specify a hotel_set_id or destination_set_id.
To set up a new travel audience, make an HTTP POST to /act_<AD_ACCOUNT_ID>/customaudiences.
| Field & Type | Description |
|---|---|
Type: | Required. The objective of the audience. Must be set to |
Type: | Required. Specify the type of signal that should be used to build this audience. Must be set to |
Type: | JSON array of "event_sources": [
{
"type": "pixel",
"id": "562030684179932"
},
{
"type": "app",
"id": "562030684179934"
}
] Required if you do not provide |
Type: | Specify the event source group whose events will back the audience. Required if you don't provide |
Type: | Required. An array of JSON objects listing each intent signal that would make a Accounts Center account eligible for this audience. See Inclusion Object Parameters table below. |
Type: | A further description of the audience. |
Type: | An array of JSON objects listing each intent signal that would exclude an eligible Accounts Center account from this audience. See Exclusion Object Parameters table below. |
Type: | A classical audience rule to be applied to the event stream before any |
| Field Name and Type | Description |
|---|---|
Type: | Required. The event name of a signal you want to consider for inclusion. Example: |
Type: | Required. The minimum/maximum amount of time since the event was received for it to be considered for purposes of inclusion. The retention window must be at least 4 hours. See Retention Object Parameters table below. Example: |
Type: | Booking window is the time in seconds between the user's checkin date and the current time. You specify a range and only people whose booking window is within this range are included. Negative booking windows are also supported, allowing you to include people whose checkin date has passed. See Booking Window Object Parameters table below. Examples:
|
Type: | The number of times that the event has been fired. You can use both equality and numeric comparison operators here. Examples: |
| Field Name and Type | Description |
|---|---|
Type: | Required. The maximum amount of time (in seconds) since the event was received. Example: |
Type: | The minimum amount of time (in seconds) since the event was received. Example: |
| Field Name and Type | Description |
|---|---|
Type: | Required. The minimum amount of time (in seconds) between current date and the desired checkin-date of the user. Example: |
Type: | Required. The maximum amount of time (in seconds) between current date and the desired checkin-date. Example: |
| Field Name and Type | Description |
|---|---|
Type: | Required. The event name of a signal you want to consider for exclusion. Example: |
type: | Required. The minimum/maximum amount of time since the event was received for it to be considered for purposes of exclusion. The retention window must be at least 4 hours. See Retention Object Parameters table below. Example: |
Just as with the classical parameter, each parameter here can be used with any of the standard JSON operators.
| Field Name and Type | Description |
|---|---|
type: | Matches only those events when at least one Only for travel audiences with Example: |
type: | Matches only those events when at least one Only for travel audiences with Example: |
type: | Required for flight ads. Matches only those events when the route ( Only for travel audiences with Example: |
type: | Number of nights spent during the trip. Example: |
type: | Number of weekends between the start and end date Example: |
type: | Total number of travelers
Example: |
Date fields:
type: | Use relevant date fields based on Example: |
type: | Trip contains a specific date. Example: |
Single travelers who have searched at least 3 times in the last 5 days but haven't booked yet:
curl \
-F 'name=Travel Audience' \
-F 'subtype=CLAIM' \
-F 'claim_objective=TRAVEL' \
-F 'content_type=HOTEL' \
-F 'event_source_group=<EVENT_SOURCE_GROUP_ID>' \
-F 'rule={"num_travelers":{"eq":1}}' \
-F 'inclusions=[
{
"event": "Search",
"count": {"gt":3},
"retention": {"min_seconds":0,"max_seconds":432000}
}
]' \
-F 'exclusions=[{"event":"Purchase","retention":{"min_seconds":0,"max_seconds":172800}}]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/customaudiences
People who viewed or started booking a hotel in a hotel set in the last 2 days but never completed their booking:
curl \
-F 'name=Travel Audience' \
-F 'subtype=CLAIM' \
-F 'claim_objective=TRAVEL' \
-F 'content_type=HOTEL' \
-F 'event_source_group=<EVENT_SOURCE_GROUP_ID>' \
-F 'rule={"hotel_set_id":{"eq":"<HOTEL_SET_ID>"}}' \
-F 'inclusions=[
{"event":"ViewContent","retention":{"min_seconds":0,"max_seconds":172800}},
{
"event": "InitiateCheckout",
"retention": {"min_seconds":0,"max_seconds":172800}
}
]' \
-F 'exclusions=[{"event":"Purchase","retention":{"min_seconds":0,"max_seconds":172800}}]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/customaudiences
People who have initiated check out or purchased the flight tickets in the last 5 days and their flight booking window is between 2 to 7 days:
curl \
-F 'name=Travel Audience' \
-F 'subtype=CLAIM' \
-F 'claim_objective=TRAVEL' \
-F 'content_type=FLIGHT' \
-F 'event_source_group=<EVENT_SOURCE_GROUP_ID>' \
-F 'inclusions=[
{
"event": "InitiateCheckout",
"retention": {"min_seconds":0,"max_seconds":432000},
"booking_window": {"min_seconds":172800,"max_seconds":604800}
},
{
"event": "Purchase",
"retention": {"min_seconds":0,"max_seconds":432000},
"booking_window": {"min_seconds":172800,"max_seconds":604800}
}
]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/customaudiences
People who have searched hotels in 'New York City' more than 3 times in the past 2 days but haven't booked yet:
curl \
-F 'name=Travel Audience' \
-F 'subtype=CLAIM' \
-F 'claim_objective=TRAVEL' \
-F 'content_type=HOTEL' \
-F 'event_source_group=<EVENT_SOURCE_GROUP_ID>' \
-F 'rule={"destination":{"i_contains":"New York City"}}' \
-F 'inclusions=[
{
"event": "Search",
"count": {"gt":3},
"retention": {"min_seconds":0,"max_seconds":172800}
}
]' \
-F 'exclusions=[{"event":"Purchase","retention":{"min_seconds":0,"max_seconds":172800}}]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/customaudiences
People who have searched hotels between specific checkin_date and checkout_date in the past 2 days but haven't booked yet:
curl \
-F 'name=Travel Audience' \
-F 'subtype=CLAIM' \
-F 'claim_objective=TRAVEL' \
-F 'content_type=HOTEL' \
-F 'event_source_group=<EVENT_SOURCE_GROUP_ID>' \
-F 'rule={
"and": [
{"checkin_date":{"gte":"2018-02-02"}},
{"checkout_date":{"lte":"2018-02-05"}}
]
}' \
-F 'inclusions=[{"event":"Search","retention":{"min_seconds":0,"max_seconds":172800}}]' \
-F 'exclusions=[{"event":"Purchase","retention":{"min_seconds":0,"max_seconds":172800}}]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/customaudiences
People who have searched hotel stays containing a specific date (e.g. Christmas) in the past 2 days but haven't booked yet:
curl \
-F 'name=Travel Audience' \
-F 'subtype=CLAIM' \
-F 'claim_objective=TRAVEL' \
-F 'content_type=HOTEL' \
-F 'event_source_group=<EVENT_SOURCE_GROUP_ID>' \
-F 'rule={"itinerary_contains_date":{"eq":"2018-12-25"}}' \
-F 'inclusions=[{"event":"Search","retention":{"min_seconds":0,"max_seconds":172800}}]' \
-F 'exclusions=[{"event":"Purchase","retention":{"min_seconds":0,"max_seconds":172800}}]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/customaudiences
People who create an audience for one-way flights:
curl \
-F 'name=Travel Audience' \
-F 'claim_objective=TRAVEL' \
-F 'content_type=FLIGHT' \
-F 'event_source_group=<EVENT_SOURCE_GROUP_ID>' \
-F 'rule={"and":[{"returning_departure_date":{"exists":false]}}' \
-F 'inclusions=[
{
"event": "Search",
"count": {"gt":3},
"retention": {"min_seconds":0,"max_seconds":432000}
}
]' \
-F 'exclusions=[{"event":"Purchase","retention":{"min_seconds":0,"max_seconds":172800}}]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/customaudiencesOnce you have created your audience(s), they can then be added to the targeting spec in your travel ads campaign.