When you create hotel ads, we recommend that you use these template tags in the ad creative and deep-link URLs. When Facebook displays your ad, we replace the template tags with that person's travel selections.
Provide template tags in double curly brackets**: {{....}}
Before using template tags, provide all required details through your Hotel Events.
For example, the title of your ad could be:
Complete your booking to {{hotel.city}}
today!
And the template URL of your ad could deep link people straight to the hotel page they were interested in, with the right checkin and checkout date:
https://www.(...).com/hotels?id={{hotel.hotel_id}}&checkin={{trip.checkin_date date_format:Y-m-d}}&checkout={{trip.checkout_date date_format:Y-m-d}}
Dynamic dates for template tags enable you to continuously update the dates that appear in your ad, without having to re-upload the data in feed. You can use these for Advantage+ catalog ads used for a particular vertical, such as for hotels, flights, destinations, automotive, and so on. You can specify the following options with these tags:
n
daysn
monthsn
yearsThe syntax for these tags is as follows:
Today: {{date.today}} Today + 12 days: {{date.today date_offset:+12d}} Today - 12 days: {{date.today date_offset:-12d}} Today + 3 months: {{date.today date_offset:+3m}} Today + 3 years: {{date.today date_offset:+3y}}
By default, we use UTC; however, you can override with a specific time zone. For example:
{{date.today date_timezone:PST}}
Template Tag | Description |
---|---|
| Hotel brand provided in catalog. |
| If dynamic pricing is provided, this displays the base price from room type. If advertiser has not provided dynamic pricing, this displays the |
| The check-in date that Facebook collected for the user from the advertiser. If there is no check-in date collected, this template tag defaults to the next day. We support most of the date formats provided here. Example:
|
| The checkout date that Facebook collected for the user from the advertiser. If there is no checkout date collected, this template tag defaults to the day after tomorrow. We support most of the date formats provided here. Example:
|
| City provided in catalog. |
| City ID provided in catalog. |
| Country provided in catalog. |
| The ISO-4217 currency code (for example, "USD") passed by the advertiser in dynamic events (for example, pixel events) using the key currency. If no currency code has been passed for an item, we show the product's feed's default currency. |
| Hotel description provided in catalog. |
| Hotel guest rating provided in your catalog. To use this template tag, at least 30% of the catalog items must have a rating. |
| Hotel ID provided by advertiser in catalog. |
| Hotel name provided in catalog. |
| First neighborhood provided in catalog. |
| Number of adult travelers, based on intent signals Facebook collects about the user. Currently defaults to `1;, subject to change. |
| Number of children travelers, based on intent signals Facebook collects about the user. Currently defaults to |
| Sum of adult and children travelers, based on intent signals Facebook collects about the user. Currently defaults to |
| If dynamic pricing is provided, this displays the average dynamic price per night with tax and fees. If advertiser has not provided dynamic pricing, this defaults to base price. |
| If dynamic pricing is provided, this displays the average dynamic sale price per night. If advertiser has not provided dynamic date-based sale price, this defaults to sale price at the room level. |
| Hotel star rating provided in your catalog feed. To use this tag, at least 30% of the catalog items must have this field. |
| If dynamic pricing is provided, this can be used to display the total price a user has to pay for the entire stay, including tax and fees. |
| Hotel URL provided in catalog. |
In addition to the tags above, these date-specific options are available:
Template Tag | Description |
---|---|
| Today's date. |
| Today's date in format 20181231. We support most of the formats defined in PHP, |
|
|
| For example, |