CINXE.COM
Variables and conditions | Hotel Prices | Google for Developers
<!doctype html> <html lang="en" dir="ltr"> <head> <meta name="google-signin-client-id" content="721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award"> <meta property="og:site_name" content="Google for Developers"> <meta property="og:type" content="website"><meta name="theme-color" content="#1a73e8"><meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/_pwa/developers/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//www.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.googleapis.com" crossorigin> <link rel="preconnect" href="//apis.google.com" crossorigin> <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/css/app.css"> <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/favicon-new.png"> <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/touchicon-180-new.png"><link rel="canonical" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls"><link rel="search" type="application/opensearchdescription+xml" title="Google for Developers" href="https://developers.google.com/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls" /><link rel="alternate" hreflang="x-default" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls" /><link rel="alternate" hreflang="ar" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=ar" /><link rel="alternate" hreflang="bn" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=bn" /><link rel="alternate" hreflang="zh-Hans" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=zh-tw" /><link rel="alternate" hreflang="fa" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=fa" /><link rel="alternate" hreflang="fr" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=fr" /><link rel="alternate" hreflang="de" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=de" /><link rel="alternate" hreflang="he" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=he" /><link rel="alternate" hreflang="hi" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=hi" /><link rel="alternate" hreflang="id" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=id" /><link rel="alternate" hreflang="it" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=it" /><link rel="alternate" hreflang="ja" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=ja" /><link rel="alternate" hreflang="ko" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=ko" /><link rel="alternate" hreflang="pl" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=pl" /><link rel="alternate" hreflang="pt-BR" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=pt-br" /><link rel="alternate" hreflang="ru" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=ru" /><link rel="alternate" hreflang="es-419" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=es-419" /><link rel="alternate" hreflang="th" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=th" /><link rel="alternate" hreflang="tr" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=tr" /><link rel="alternate" hreflang="vi" href="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls?hl=vi" /><title>Variables and conditions | Hotel Prices | Google for Developers</title> <meta property="og:title" content="Variables and conditions | Hotel Prices | Google for Developers"><meta property="og:url" content="https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls"><meta property="og:image" content="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/opengraph/google-blue.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="675"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary_large_image"><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "Variables and conditions" } </script><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Hotel APIs", "item": "https://developers.google.com/hotels" },{ "@type": "ListItem", "position": 2, "name": "Hotel Prices", "item": "https://developers.google.com/hotels/hotel-prices" },{ "@type": "ListItem", "position": 3, "name": "Variables and conditions", "item": "https://developers.google.com/hotels/hotel-prices/dev-guide/pos-urls" }] } </script> <link rel="stylesheet" href="/extras.css"></head> <body class="" template="page" theme="google-blue" type="article" layout="docs" concierge='closed' display-toc pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"> <devsite-cookie-notification-bar></devsite-cookie-notification-bar><devsite-header role="banner"> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" aria-label="Product breadcrumb"> <li class="devsite-breadcrumb-item devsite-has-google-wordmark"> <a href="https://developers.google.com/hotels" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Google Hotel APIs" > <svg class="devsite-google-wordmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 148 48"> <title>Google</title> <path class="devsite-google-wordmark-svg-path" d="M19.58,37.65c-9.87,0-18.17-8.04-18.17-17.91c0-9.87,8.3-17.91,18.17-17.91c5.46,0,9.35,2.14,12.27,4.94l-3.45,3.45c-2.1-1.97-4.93-3.49-8.82-3.49c-7.21,0-12.84,5.81-12.84,13.02c0,7.21,5.64,13.02,12.84,13.02c4.67,0,7.34-1.88,9.04-3.58c1.4-1.4,2.32-3.41,2.66-6.16H19.58v-4.89h16.47c0.18,0.87,0.26,1.92,0.26,3.06c0,3.67-1.01,8.21-4.24,11.44C28.93,35.9,24.91,37.65,19.58,37.65z M61.78,26.12c0,6.64-5.1,11.53-11.36,11.53s-11.36-4.89-11.36-11.53c0-6.68,5.1-11.53,11.36-11.53S61.78,19.43,61.78,26.12z M56.8,26.12c0-4.15-2.96-6.99-6.39-6.99c-3.43,0-6.39,2.84-6.39,6.99c0,4.11,2.96,6.99,6.39,6.99C53.84,33.11,56.8,30.22,56.8,26.12z M87.25,26.12c0,6.64-5.1,11.53-11.36,11.53c-6.26,0-11.36-4.89-11.36-11.53c0-6.68,5.1-11.53,11.36-11.53C82.15,14.59,87.25,19.43,87.25,26.12zM82.28,26.12c0-4.15-2.96-6.99-6.39-6.99c-3.43,0-6.39,2.84-6.39,6.99c0,4.11,2.96,6.99,6.39,6.99C79.32,33.11,82.28,30.22,82.28,26.12z M112.09,15.29v20.7c0,8.52-5.02,12.01-10.96,12.01c-5.59,0-8.95-3.76-10.22-6.81l4.41-1.83c0.79,1.88,2.71,4.1,5.81,4.1c3.8,0,6.16-2.36,6.16-6.77v-1.66h-0.18c-1.14,1.4-3.32,2.62-6.07,2.62c-5.76,0-11.05-5.02-11.05-11.49c0-6.51,5.28-11.57,11.05-11.57c2.75,0,4.93,1.22,6.07,2.58h0.18v-1.88H112.09z M107.64,26.16c0-4.06-2.71-7.03-6.16-7.03c-3.49,0-6.42,2.97-6.42,7.03c0,4.02,2.93,6.94,6.42,6.94C104.93,33.11,107.64,30.18,107.64,26.16z M120.97,3.06v33.89h-5.07V3.06H120.97z M140.89,29.92l3.93,2.62c-1.27,1.88-4.32,5.11-9.61,5.11c-6.55,0-11.28-5.07-11.28-11.53c0-6.86,4.77-11.53,10.71-11.53c5.98,0,8.91,4.76,9.87,7.34l0.52,1.31l-15.42,6.38c1.18,2.31,3.01,3.49,5.59,3.49C137.79,33.11,139.58,31.84,140.89,29.92zM128.79,25.77l10.31-4.28c-0.57-1.44-2.27-2.45-4.28-2.45C132.24,19.04,128.66,21.31,128.79,25.77z"/> </svg>Hotel APIs </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/hotels/hotel-prices" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="Google Hotel Prices API" > Hotel Prices </a> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> </div> <devsite-search enable-signin enable-search enable-suggestions enable-query-completion project-name="Hotel Prices" tenant-name="Google for Developers" project-scope="/hotels/hotel-prices" url-scoped="https://developers.google.com/s/results/hotels/hotel-prices" > <form class="devsite-search-form" action="https://developers.google.com/s/results" method="GET"> <div class="devsite-search-container"> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-expanded="false" aria-haspopup="listbox" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="combobox" type="text" value="" > <div class="devsite-search-image material-icons" aria-hidden="true"> </div> <div class="devsite-search-shortcut-icon-container" aria-hidden="true"> <kbd class="devsite-search-shortcut-icon">/</kbd> </div> </div> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es" >Español</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> <devsite-user enable-profiles fp-auth id="devsite-user"> <span class="button devsite-top-button" aria-hidden="true" visually-hidden>Sign in</span> </devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab class="devsite-active"> <a href="https://developers.google.com/hotels/hotel-prices" track-metadata-eventdetail="https://developers.google.com/hotels/hotel-prices" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - guides" track-metadata-module="primary nav" aria-label="Guides, selected" data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" > Guides </a> </tab> <tab > <a href="https://developers.google.com/hotels/hotel-prices/api-reference" track-metadata-eventdetail="https://developers.google.com/hotels/hotel-prices/api-reference" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - api reference" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: API Reference" track-name="api reference" > API Reference </a> </tab> <tab > <a href="https://developers.google.com/hotels/hotel-prices/xml-reference/hotel-list-feed" track-metadata-eventdetail="https://developers.google.com/hotels/hotel-prices/xml-reference/hotel-list-feed" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - xml reference" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: XML Reference" track-name="xml reference" > XML Reference </a> </tab> <tab > <a href="https://developers.google.com/hotels/hotel-prices/dev-guide/where-to-get-help" track-metadata-eventdetail="https://developers.google.com/hotels/hotel-prices/dev-guide/where-to-get-help" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - support" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Support" track-name="support" > Support </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars > <div class="devsite-book-nav-filter" > <span class="filter-list-icon material-icons" aria-hidden="true"></span> <input type="text" placeholder="Filter" aria-label="Type to filter" role="searchbox"> <span class="filter-clear-button hidden" data-title="Clear filter" aria-label="Clear filter" role="button" tabindex="0"></span> </div> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" aria-label="Upper header breadcrumb"> <li class="devsite-breadcrumb-item devsite-has-google-wordmark"> <a href="https://developers.google.com/hotels" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Google Hotel APIs" > <svg class="devsite-google-wordmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 148 48"> <title>Google</title> <path class="devsite-google-wordmark-svg-path" d="M19.58,37.65c-9.87,0-18.17-8.04-18.17-17.91c0-9.87,8.3-17.91,18.17-17.91c5.46,0,9.35,2.14,12.27,4.94l-3.45,3.45c-2.1-1.97-4.93-3.49-8.82-3.49c-7.21,0-12.84,5.81-12.84,13.02c0,7.21,5.64,13.02,12.84,13.02c4.67,0,7.34-1.88,9.04-3.58c1.4-1.4,2.32-3.41,2.66-6.16H19.58v-4.89h16.47c0.18,0.87,0.26,1.92,0.26,3.06c0,3.67-1.01,8.21-4.24,11.44C28.93,35.9,24.91,37.65,19.58,37.65z M61.78,26.12c0,6.64-5.1,11.53-11.36,11.53s-11.36-4.89-11.36-11.53c0-6.68,5.1-11.53,11.36-11.53S61.78,19.43,61.78,26.12z M56.8,26.12c0-4.15-2.96-6.99-6.39-6.99c-3.43,0-6.39,2.84-6.39,6.99c0,4.11,2.96,6.99,6.39,6.99C53.84,33.11,56.8,30.22,56.8,26.12z M87.25,26.12c0,6.64-5.1,11.53-11.36,11.53c-6.26,0-11.36-4.89-11.36-11.53c0-6.68,5.1-11.53,11.36-11.53C82.15,14.59,87.25,19.43,87.25,26.12zM82.28,26.12c0-4.15-2.96-6.99-6.39-6.99c-3.43,0-6.39,2.84-6.39,6.99c0,4.11,2.96,6.99,6.39,6.99C79.32,33.11,82.28,30.22,82.28,26.12z M112.09,15.29v20.7c0,8.52-5.02,12.01-10.96,12.01c-5.59,0-8.95-3.76-10.22-6.81l4.41-1.83c0.79,1.88,2.71,4.1,5.81,4.1c3.8,0,6.16-2.36,6.16-6.77v-1.66h-0.18c-1.14,1.4-3.32,2.62-6.07,2.62c-5.76,0-11.05-5.02-11.05-11.49c0-6.51,5.28-11.57,11.05-11.57c2.75,0,4.93,1.22,6.07,2.58h0.18v-1.88H112.09z M107.64,26.16c0-4.06-2.71-7.03-6.16-7.03c-3.49,0-6.42,2.97-6.42,7.03c0,4.02,2.93,6.94,6.42,6.94C104.93,33.11,107.64,30.18,107.64,26.16z M120.97,3.06v33.89h-5.07V3.06H120.97z M140.89,29.92l3.93,2.62c-1.27,1.88-4.32,5.11-9.61,5.11c-6.55,0-11.28-5.07-11.28-11.53c0-6.86,4.77-11.53,10.71-11.53c5.98,0,8.91,4.76,9.87,7.34l0.52,1.31l-15.42,6.38c1.18,2.31,3.01,3.49,5.59,3.49C137.79,33.11,139.58,31.84,140.89,29.92zM128.79,25.77l10.31-4.28c-0.57-1.44-2.27-2.45-4.28-2.45C132.24,19.04,128.66,21.31,128.79,25.77z"/> </svg>Hotel APIs </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/hotels/hotel-prices" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="Google Hotel Prices API" > Hotel Prices </a> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/hotels/hotel-prices" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Guides" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Guides </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/hotels/hotel-prices/api-reference" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: API Reference" track-name="api reference" data-category="Site-Wide Custom Events" data-label="Responsive Tab: API Reference" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > API Reference </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/hotels/hotel-prices/xml-reference/hotel-list-feed" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: XML Reference" track-name="xml reference" data-category="Site-Wide Custom Events" data-label="Responsive Tab: XML Reference" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > XML Reference </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/hotels/hotel-prices/dev-guide/where-to-get-help" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Support" track-name="support" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Support" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Support </span> </a> </li> </ul> </div> <div class="devsite-mobile-nav-bottom"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item"><a href="/hotels/hotel-prices" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices" ><span class="devsite-nav-text" tooltip>Overview</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Setup and Configuration</span> </div></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/data-feeds" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/data-feeds" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/data-feeds" ><span class="devsite-nav-text" tooltip>Integration Overview</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/delivery-mode" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/delivery-mode" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/delivery-mode" ><span class="devsite-nav-text" tooltip>Pricing Delivery Modes</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/schemas" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/schemas" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/schemas" ><span class="devsite-nav-text" tooltip>Schemas</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Hotel List</span> </div></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/hlf" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/hlf" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/hlf" ><span class="devsite-nav-text" tooltip>Setting Up a Hotel List in XML</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Availability, Rates, and Inventory (ARI)</span> </div></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/ari-overview" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/ari-overview" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/ari-overview" ><span class="devsite-nav-text" tooltip>ARI Overview (Push delivery mode)</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/ari-transaction-message" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/ari-transaction-message" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/ari-transaction-message" ><span class="devsite-nav-text" tooltip>Transaction (Property Data) Message</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/ari-rate-message" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/ari-rate-message" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/ari-rate-message" ><span class="devsite-nav-text" tooltip>Rate Message</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/ari-inventory-message" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/ari-inventory-message" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/ari-inventory-message" ><span class="devsite-nav-text" tooltip>Inventory Message</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/ari-availability-message" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/ari-availability-message" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/ari-availability-message" ><span class="devsite-nav-text" tooltip>Availability Message</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/ari-tax-message" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/ari-tax-message" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/ari-tax-message" ><span class="devsite-nav-text" tooltip>Tax and Fee Message</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/ari-promotions-message" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/ari-promotions-message" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/ari-promotions-message" ><span class="devsite-nav-text" tooltip>Promotions Message</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/ari-glossary" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/ari-glossary" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/ari-glossary" ><span class="devsite-nav-text" tooltip>ARI Glossary</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Pull delivery mode for Transactions</span> </div></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/updating-prices" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/updating-prices" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/updating-prices" ><span class="devsite-nav-text" tooltip>Overview (Pull delivery mode)</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/transaction-overview" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/transaction-overview" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/transaction-overview" ><span class="devsite-nav-text" tooltip>Transaction Messages</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/inventory" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/inventory" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/inventory" ><span class="devsite-nav-text" tooltip>Adding and Updating Inventory</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/removing-inventory" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/removing-inventory" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/removing-inventory" ><span class="devsite-nav-text" tooltip>Removing Inventory</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/room-bundles" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/room-bundles" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/room-bundles" ><span class="devsite-nav-text" tooltip>Using Room Bundles</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/fenced-rates" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/fenced-rates" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/fenced-rates" ><span class="devsite-nav-text" tooltip>Conditional Rates</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/qualified-rates" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/qualified-rates" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/qualified-rates" ><span class="devsite-nav-text" tooltip>Private Rates</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/rate-rule-errors" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/rate-rule-errors" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/rate-rule-errors" ><span class="devsite-nav-text" tooltip>Rate Rule Error Messages</span></a></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Query & Hint Messages</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/hint-request-messages" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/hint-request-messages" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/hint-request-messages" ><span class="devsite-nav-text" tooltip>Hint Request Messages</span></a></li><li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/hint-response-messages" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/hint-response-messages" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/hint-response-messages" ><span class="devsite-nav-text" tooltip>Hint Response Messages</span></a></li><li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/query-messages" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/query-messages" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/query-messages" ><span class="devsite-nav-text" tooltip>Query Messages</span></a></li></ul></div></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/feed-status-errors" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/feed-status-errors" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/feed-status-errors" ><span class="devsite-nav-text" tooltip>Feed Status Error Messages</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Landing Pages</span> </div></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/pos-overview" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/pos-overview" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/pos-overview" ><span class="devsite-nav-text" tooltip>Overview</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/pos-syntax" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/pos-syntax" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/pos-syntax" ><span class="devsite-nav-text" tooltip>Landing Pages File Syntax</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/pos-matching" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/pos-matching" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/pos-matching" ><span class="devsite-nav-text" tooltip>Landing Page Matching Rules</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/pos-urls" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/pos-urls" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/pos-urls" ><span class="devsite-nav-text" tooltip>Using Variables and Conditions</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/pos-tracking" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/pos-tracking" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/pos-tracking" ><span class="devsite-nav-text" tooltip>Using Tracking</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Bidding (Hotel Ads)</span> </div></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/submitting-bids" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/submitting-bids" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/submitting-bids" ><span class="devsite-nav-text" tooltip>Submitting Bids</span></a></li> <li class="devsite-nav-item"><a href="/hotels/hotel-prices/dev-guide/spending-caps" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /hotels/hotel-prices/dev-guide/spending-caps" track-type="bookNav" track-name="click" track-metadata-eventdetail="/hotels/hotel-prices/dev-guide/spending-caps" ><span class="devsite-nav-text" tooltip>Setting Spending Caps</span></a></li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav > <devsite-content> <article class="devsite-article"> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developers.google.com/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="" > Home </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/products" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="" > Products </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/hotels" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="Google Hotel APIs" > Hotel APIs </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/hotels/hotel-prices" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="4" track-type="globalNav" track-name="breadcrumb" track-metadata-position="4" track-metadata-eventdetail="Google Hotel Prices API" > Hotel Prices </a> </li> </ul> <devsite-thumb-rating position="header"> </devsite-thumb-rating> </div> <devsite-feedback position="header" project-name="Hotel Prices" product-id="82128" bucket="Hotels" context="DevSite feedback link" version="t-devsite-webserver-20241114-r00-rc02.464922260396498922" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="header" class="nocontent" project-feedback-url="https://support.google.com/hotelprices/" project-icon="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/touchicon-180-new.png" project-support-url="https://support.google.com/hotelprices/" > <button> Send feedback </button> </devsite-feedback> <h1 class="devsite-page-title" tabindex="-1"> Variables and conditions </h1> <devsite-feature-tooltip ack-key="AckCollectionsBookmarkTooltipDismiss" analytics-category="Site-Wide Custom Events" analytics-action-show="Callout Profile displayed" analytics-action-close="Callout Profile dismissed" analytics-label="Create Collection Callout" class="devsite-page-bookmark-tooltip nocontent" dismiss-button="true" id="devsite-collections-dropdown" dismiss-button-text="Dismiss" close-button-text="Got it"> <devsite-bookmark></devsite-bookmark> <span slot="popout-heading"> Stay organized with collections </span> <span slot="popout-contents"> Save and categorize content based on your preferences. </span> </devsite-feature-tooltip> <div class="devsite-page-title-meta"><devsite-view-release-notes></devsite-view-release-notes></div> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded > </devsite-toc> <div class="devsite-article-body clearfix "> <p>Hotel Ads and free booking links include links to landing pages where the users can book rooms. You can define how Google constructs the link to include all additional information about the user and their itinerary. For example, you can include information such as the hotel ID, language, currency codes, and check-in dates in the URL.</p> <h2 id="building-overview" data-text="Overview" tabindex="-1">Overview</h2> <p>You define the landing page URL in the landing pages file. When the ad or free booking link is displayed, dynamic information in the URL is replaced with actual values. To add dynamic values to your landing page URLs, use the following syntax:</p> <div></div><devsite-code><pre class="devsite-click-to-copy readonly" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://<var translate="no">partner_url</var>?<var translate="no">param_id</var>=(<var translate="no">variable_name</var>)</URL> </code></pre></devsite-code> <p>The following examples shows a URL that uses Google's variable names instead of actual hotel ID and itinerary:</p> <h3 id="example_1" data-text="Example 1" tabindex="-1">Example 1</h3> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://www.partnerdomain.com?hotelID=<strong>(PARTNER-HOTEL-ID)</strong> <span class="devsite-syntax-w"> </span>&amp;checkinDay=<strong>(CHECKINDAY)</strong>&amp;checkinMonth=<strong>(CHECKINMONTH) <span class="devsite-syntax-w"> </span></strong>&amp;checkinYear=<strong>(CHECKINYEAR)</strong>&amp;nights=<strong>(LENGTH)</strong> </URL> </code></pre></devsite-code> <h3 id="example_2" data-text="Example 2" tabindex="-1">Example 2</h3> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://www.partnerdomain.com/hotel/<strong>(PARTNER-HOTEL-ID)</strong> <span class="devsite-syntax-w"> </span>&amp;checkinDay=<strong>(CHECKINDAY)</strong>&amp;checkinMonth=<strong>(CHECKINMONTH) <span class="devsite-syntax-w"> </span></strong>&amp;checkinYear=<strong>(CHECKINYEAR)</strong>&amp;nights=<strong>(LENGTH)</strong> </URL> </code></pre></devsite-code> <p>When the landing page link is constructed for search results page, Google replaces the variables with the actual values to ensure the URL includes the dynamic information. For example, if the user books a room for 6 nights starting on 5/23/2023 for hotel #42, Google renders the previous link as the following:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partnerdomain.com?hotelID=42&checkinDay=23&checkinMonth=05&checkinYear=2023&nights=6 </code></pre></devsite-code> <p>Values that Google assigns to the variables in the query string depends on the corresponding data in your Hotel Price Feed, Hotel List Feed and user settings.</p> <p>For example,the value of <code translate="no" dir="ltr">LENGTH</code> variable is assigned to <code translate="no" dir="ltr"><Nights></code> element from the related itinerary's price feed. Similarly, the value of <code translate="no" dir="ltr">PARTNER-HOTEL-ID</code> variable is defined in the <code translate="no" dir="ltr"><id></code> element from the Hotel List Feed that matched the user's search criteria.</p> <p>Some variables are subsets of the price feed elements. For example, the <code translate="no" dir="ltr">CHECKINDAY</code>, <code translate="no" dir="ltr">CHECKINMONTH</code>, and <code translate="no" dir="ltr">CHECKINYEAR</code> variables are extracted from the single <code translate="no" dir="ltr"><Checkin></code> element in the price feed. Other variables are calculated based on the user's locale and other client settings.</p> <p>For more information about the sources of variable values, refer to <a href="/hotels/hotel-prices/dev-guide/updating-prices">Pricing overview</a> and <a href="https://developers.google.com/hotels/hotel-prices/xml-reference/hotel-list-feed">Hotel List</a>.</p> <h2 id="building-variables" data-text="URL variables" tabindex="-1">URL variables</h2> <p>The following table describes the available variables that you can use to construct your landing page URL:</p> <table class= "fixed"> <tbody> <tr> <th width="23%">Variable</th> <th width="18%">Recommended/optional</th> <th>Description</th> </tr> <tr> <td><span translate="no">ADVANCE-BOOKING-WINDOW</span></td> <td><span translate="no">Optional</span></td> <td>The number of advance booking days prior to check-in date in the hotel's timezone at the time of booking. For example, <code translate="no" dir="ltr">36</code>.</td> </tr> <tr> <td><span translate="no">ALTERNATE-HOTEL-ID</span></td> <td><span translate="no">Recommended (if you have separate IDs to identify properties versus booking engines)</span></td> <td>An alternate identifier for your property. This <a href="/hotels/hotel-prices/xml-reference/hotel-list-feed#attribute-names">attribute name</a> is specified in your Hotel List Feed. Having separate IDs is useful if you need one property identifier for your feed information and another property identifier for your booking engine.</td> </tr> <tr> <td><span translate="no">CAMPAIGN-ID</span></td> <td><span translate="no">Recommended</span></td> <td>The ID of the Google Ads campaign you'd like to associate with the URL. This is blank if the click is not associated to a Google Ads campaign.</td> </tr> <tr> <td><span translate="no">CHECKINDAY</span></td> <td><span translate="no">Recommended</span></td> <td>The two-digit day defined in the <code translate="no" dir="ltr"><Checkin></code> element of the Hotel Price Feed. For example, <code translate="no" dir="ltr">20</code>.</td> </tr> <tr> <td><span translate="no">CHECKINDAY-OF-WEEK</span></td> <td><span translate="no">Optional</span></td> <td>The day of the week —<code translate="no" dir="ltr">Monday</code> to <code translate="no" dir="ltr">Sunday</code>, when the check-in takes place, in the hotel's timezone. For example, <code translate="no" dir="ltr">Tuesday</code>.</td> </tr> <tr> <td><span translate="no">CHECKINMONTH</span></td> <td><span translate="no">Recommended</span></td> <td>The two-digit month defined in the <code translate="no" dir="ltr"><Checkin></code> element of the Hotel Price Feed. For example, <code translate="no" dir="ltr">05</code>.</td> </tr> <tr> <td><span translate="no">CHECKINYEAR</span></td> <td><span translate="no">Recommended</span></td> <td>The four-digit year defined in the <code translate="no" dir="ltr"><Checkin></code> element of the Hotel Price Feed. For example, <code translate="no" dir="ltr">2023</code>.</td> </tr> <tr> <td><span translate="no">CHECKOUTDAY</span></td> <td><span translate="no">Recommended</span></td> <td>The two-digit day calculated from the <code translate="no" dir="ltr"><Nights></code> and <code translate="no" dir="ltr"><Checkin></code> elements of the Hotel Price Feed. For example, <code translate="no" dir="ltr">26</code>.</td> </tr> <tr> <td><span translate="no">CHECKOUTMONTH</span></td> <td><span translate="no">Recommended</span></td> <td>The two-digit month calculated from the <code translate="no" dir="ltr"><Nights></code> and <code translate="no" dir="ltr"><Checkin></code> elements of the Hotel Price Feed. For example, <code translate="no" dir="ltr">05</code>.</td> </tr> <tr> <td><span translate="no">CHECKOUTYEAR</span></td> <td><span translate="no">Recommended</span></td> <td>The four-digit year calculated from the <code translate="no" dir="ltr"><Nights></code> and <code translate="no" dir="ltr"><Checkin></code> elements of the Hotel Price Feed. For example, <code translate="no" dir="ltr">2023</code>.</td> </tr> <tr> <td><span translate="no">CHILD-AGE</span></td> <td><span translate="no">Recommended (must be provided for child occupancy pricing)</span></td> <td>The maximum age of each child as specified in the <a href="/hotels/hotel-prices/xml-reference/transaction-messages#occupancydetails-children"> <code translate="no" dir="ltr"><Child "age"></code></a> elements of the price feed. This variable must be used in conjunction with a <code translate="no" dir="ltr">FOR-EACH-CHILD-AGE</code> conditional block.</td> </tr> <tr> <td><span translate="no">CHILD-INDEX</span></td> <td><span translate="no">Optional</span></td> <td>A 0-indexed loop variable representing a counter for each child occupant and child age specified in the itinerary. While it is not mandatory, this variable can only be used in conjunction with a <code translate="no" dir="ltr">FOR-EACH-CHILD-AGE</code> conditional block. </td> </tr> <tr> <td><span translate="no">CLICK-TYPE</span></td> <td><span translate="no">Optional</span></td> <td>Indicates whether the user clicked on the listing for a standard hotel rate or for a Room Bundle. Possible values are: <ul> <li><code translate="no" dir="ltr">hotel</code>: The user clicked on the listing for a standard room rate.</li> <li><code translate="no" dir="ltr">room</code>: The user clicked on the listing for a Room Bundle.</li> </ul> </td> </tr> <tr> <td><span translate="no">CLOSE-RATE-RULE-IDS</span></td> <td><span translate="no">Optional (only applies if you are using conditional or private rates)</span></td> <td>A comma-separated list of rate rule IDs for rates that were unavailable, but it could have been available if the user had taken a minor action. Note that rate rule IDs for <a href="/hotels/hotel-prices/dev-guide/qualified-rates">private rates</a> are always be populated here when a corresponding UI treatment is shown to the user.</td> </tr> <tr> <td><span translate="no">CUSTOM[1-5]</span></td> <td><span translate="no">Optional</span></td> <td>The values for custom fields defined in the <code translate="no" dir="ltr"><Result></code> element with 200 characters limit per custom field. For more information, refer to <a href="/hotels/hotel-prices/dev-guide/transaction-overview">Overview of Transaction Messages</a>. Custom fields are not available when using <a href="/hotels/hotel-prices/dev-guide/ari-overview">ARI</a>.</td> </tr> <tr> <td><span translate="no">DATE-TYPE</span></td> <td><span translate="no">Optional</span></td> <td>Indicates whether the user selected the default date or a specific date provided in the search. Possible values are: <ul> <li><code translate="no" dir="ltr">default</code>: The user clicked on a hotel ad or free booking link where the default dates were used.</li> <li><code translate="no" dir="ltr">selected</code>: The user clicked on a hotel ad or free booking link with the dates set.</li> </ul> </td> </tr> <tr> <td><span translate="no">GOOGLE-ADS-CLICK-SOURCE</span></td> <td><span translate="no">Optional</span></td> <td>Indicates Google Ads was the source of the click. Possible values are: <ul> <li><code translate="no" dir="ltr">bl</code>: Paid Booking Links</li> <li><code translate="no" dir="ltr">tpa</code>: Travel Promotions Ads</li> <li><code translate="no" dir="ltr">tfsa</code>: Travel Feeds in Search Ads</li> <li><code translate="no" dir="ltr">pm</code>: Performance Max or Performance Max for Travel Goals campaigns.</li> <p class="note"><strong>Note:</strong> If the click originated from Google Search rather than Google Ads, this parameter is empty</p> </ul> </td> </tr> <tr> <td><span translate="no">GOOGLE-SITE</span></td> <td><span translate="no">Optional</span></td> <td>The Google property on which a user viewed your hotel pricing data. Possible values are: <ul> <li><code translate="no" dir="ltr">localuniversal</code>: The user found the hotel booking link through <code translate="no" dir="ltr">google.com</code> search.</li> <li><code translate="no" dir="ltr">mapresults</code>: The user found the hotel booking link through <code translate="no" dir="ltr">maps.google.com</code>.</li> <li><code translate="no" dir="ltr">verification</code>: Google uses this value when performing automated data quality tests on your site. You are not billed for these queries. Google Analytics can use this parameter and its value for identifying Hotel Ads automated verification traffic.</li> <li><code translate="no" dir="ltr">unknown</code>: The user found the ad or free booking link through an undetermined source.</li> </ul> </td> </tr> <tr> <td><span translate="no">LENGTH</span></td> <td><span translate="no">Recommended</span></td> <td>The length of stay in terms of the number of nights defined by the <code translate="no" dir="ltr"><Nights></code> element in the Hotel Price Feed. For example, <code translate="no" dir="ltr">3</code>.</td> </tr> <tr> <td><span translate="no">NUM-ADULTS</span></td> <td><span translate="no">Recommended (must be used with the <code translate="no" dir="ltr">NUM-CHILDREN</code> or <code translate="no" dir="ltr">FOR-EACH-CHILD-AGE</code> condition) </span></td> <td>The number of adult occupants specified for the itinerary by the user. This variable must be used in conjunction with <code translate="no" dir="ltr">NUM-CHILDREN</code>, <code translate="no" dir="ltr">FOR-EACH-CHILD-AGE</code>, or both.</td> </tr> <tr> <td><span translate="no">NUM-CHILDREN</span></td> <td><span translate="no">Recommended</span></td> <td>The number of child occupants (0-17 yrs old) specified in the itinerary by the user. <code translate="no" dir="ltr">NUM-CHILDREN</code>, <code translate="no" dir="ltr">FOR-EACH-CHILD-AGE</code>, or both are required to successfully participate in itineraries with child occupants.</td> </tr> <tr> <td><span translate="no">NUM-GUESTS</span></td> <td><span translate="no">Recommended (if you don't send child occupancy pricing)</span></td> <td>The total number of occupants, both adults and children, specified for the itinerary by the user. This value is a sum of the <code translate="no" dir="ltr">NUM-ADULTS</code> and <code translate="no" dir="ltr">NUM-CHILDREN</code> values. To maximize participation, it is strongly recommended to utilize both <code translate="no" dir="ltr">NUM-ADULTS</code> and <code translate="no" dir="ltr">NUM-CHILDREN</code> instead.</td> </tr> <tr> <td><span translate="no">PACKAGE-ID</span></td> <td><span translate="no">Recommended (applies if you use Room Bundles) </span></td> <td>The unique identifier for the package in the Hotel Price Feed. For a standard package, the package ID is the value of the <code translate="no" dir="ltr"><PackageID></code> element within a <code translate="no" dir="ltr"><Result></code> block. For a Room Bundle, the package ID is the value of the <code translate="no" dir="ltr"><PackageID></code> element within the <code translate="no" dir="ltr"><RoomBundle></code> or <code translate="no" dir="ltr"><PackageData></code> blocks of the Transaction message.</td> </tr> <tr> <td><span translate="no">PARTNER-CURRENCY</span></td> <td><span translate="no">Optional</span></td> <td>The three-letter <a href="https://support.google.com/merchants/answer/160637">currency code</a> defined by the <code translate="no" dir="ltr"><Baserate></code> element's <code translate="no" dir="ltr">currency</code> attribute in the Hotel Price Feed. For example, <code translate="no" dir="ltr">USD</code> or <code translate="no" dir="ltr">CAD </code>.</td> </tr> <tr> <td><span translate="no">PARTNER-HOTEL-ID</span></td> <td><span translate="no">Recommended</span></td> <td>The unique identifier for the hotel defined by the <code translate="no" dir="ltr"><id></code> element in the Hotel List Feed.</td> </tr> <tr> <td><span translate="no">PARTNER-ROOM-ID</span></td> <td><span translate="no">Recommended (applies if you use Room Bundles) </span></td> <td>The unique identifier for the room in the Hotel Price Feed. For a standard room, the room ID is a value of the <code translate="no" dir="ltr"><RoomID></code> element within the <code translate="no" dir="ltr"><Result></code> block. For a Room Bundle, the room ID is the value assigned to the <code translate="no" dir="ltr"><RoomID></code> element within the <code translate="no" dir="ltr"><RoomBundle></code> or <code translate="no" dir="ltr"><RoomData></code> blocks in the Transaction message.</td> </tr> <tr> <td><span translate="no">PAYMENT-ID</span></td> <td><span translate="no">Optional (only applies to Ads)</span></td> <td>Resolves to a predefined string <code translate="no" dir="ltr">commission</code>, or Google's assigned IATA number (for example, "01234567"), if you use a commissions collection agency. To change the formatting of your IATA number or predefined string, contact your Technical Account Manager (TAM).</td> </tr> <tr> <td><span translate="no">PRICE-DISPLAYED-TAX</span></td> <td><span translate="no">(Optional)</span></td> <td>The tax amount displayed to the user in the user's local currency. The value of <code translate="no" dir="ltr">PRICE-DISPLAYED-TAX</code> is the value of the <code translate="no" dir="ltr"><Tax></code> element in the Hotel Price Feed. For example, "3.14".</td> </tr> <tr> <td><span translate="no">PRICE-DISPLAYED-TOTAL</span></td> <td><span translate="no">(Optional)</span></td> <td>The total cost of the room that is displayed to the user in the user's local currency. The value of <code translate="no" dir="ltr">PRICE-DISPLAYED-TOTAL</code> is the sum of the <code translate="no" dir="ltr"><Baserate></code>, <code translate="no" dir="ltr"><Tax></code>, and <code translate="no" dir="ltr"><OtherFees></code> elements from the Hotel Price Feed. For example, "152.13".</td> </tr> <tr> <td><span translate="no">PROMO-CODE</span></td> <td><span translate="no">(Optional)</span></td> <td><p>If you use <a href="/hotels/hotel-prices/xml-reference/ari-promotions">ARI promotions</a>, the value of this variable is assigned to the <code translate="no" dir="ltr">id </code> attribute of the applied <code translate="no" dir="ltr"><Promotion></code>. If multiple promotions are applied, it is a comma-separated list of promotion IDs in an arbitrary order.</p> <p>If you use <a href="/hotels/hotel-prices/xml-reference/rate-rules"> rate rules</a>, the value of this variable is assigned to the <code translate="no" dir="ltr"> PromoCode</code> element if the corresponding rate rule is applied.</p> </td> </tr> <tr> <td><span translate="no">RATE-PLAN-ID</span></td> <td><span translate="no">Recommended (only applies if you use RoomBundles) </span></td> <td>The ID as defined by the <code translate="no" dir="ltr"><RatePlanID></code> element in a price feed's <code translate="no" dir="ltr"><RoomBundle></code> block. The <code translate="no" dir="ltr"><RatePlanID></code> represents the unique identifier for a room and package data combination. For more information, see <a href="/hotels/hotel-prices/dev-guide/room-bundles"> Room Bundles</a>.</td> </tr> <tr> <td><span translate="no">RATE-RULE-ID</span></td> <td><span translate="no">Recommended (only applies if you use conditional rates or private rates)</span></td> <td>The ID as defined by the <code translate="no" dir="ltr">rate_rule_id</code> attribute within a price feed's <code translate="no" dir="ltr"><Rate></code> block. For more information, refer to <a href="/hotels/hotel-prices/dev-guide/fenced-rates"> Conditional Rates</a>. <p class="note"><b>Note:</b> Only conditional rates or private rates that are not hidden are shown.</p></td> </tr> <tr> <td><span translate="no">USER-COUNTRY</span></td> <td><span translate="no">Recommended</span></td> <td>A <a href="/hotels/hotel-prices/dev-guide/country-codes">two-letter country code</a> that indicates the user location. This information is extracted from the user's client settings. For example, <code translate="no" dir="ltr">US</code> or <code translate="no" dir="ltr">FR</code>.</td> </tr> <tr> <td><span translate="no">USER-CURRENCY</span></td> <td><span translate="no">Recommended</span></td> <td> A three-letter <a href="https://support.google.com/merchants/answer/160637">currency code</a> that indicates the user's local currency. The value of the <code translate="no" dir="ltr">USER-CURRENCY</code> variable is inferred from the user's client settings. For example, <code translate="no" dir="ltr">USD</code> or <code translate="no" dir="ltr">CAD </code>.</td> </tr> <tr> <td><span translate="no">USER-DEVICE</span></td> <td><span translate="no">Recommended</span></td> <td>The user's device type. The value of <code translate="no" dir="ltr">USER-DEVICE</code> can be one of the following: <ul> <li><code translate="no" dir="ltr">mobile</code></li> <li><code translate="no" dir="ltr">tablet</code></li> <li><code translate="no" dir="ltr">desktop</code></li> <li><code translate="no" dir="ltr">unknown</code></li> </ul> <p>The value of the <code translate="no" dir="ltr">USER-DEVICE</code> variable is inferred from the user's client settings.</p> </td> </tr> <tr> <td><span translate="no">USER-LANGUAGE</span></td> <td><span translate="no">Recommended</span></td> <td>A <a href="/hotels/hotel-prices/dev-guide/language-codes">two-letter ISO 639-1 language code</a> that specifies the display language of the ad or free booking link. The value of the <code translate="no" dir="ltr">USER-LANGUAGE</code> variable is inferred from the user's client settings. For example, <code translate="no" dir="ltr">en</code> or <code translate="no" dir="ltr">fr</code>.</td> </tr> <tr> <td><span translate="no">USER-LIST-ID</span> (defined in Google Ads)</td> <td><span translate="no">Optional (only applies if you use Audience Lists in Google Ads)</span></td> <td>The Google Ads user list ID that contains the audience list or user information. Audience lists are used as a basis for <a href="//support.google.com/google-ads/answer/9244121">setting bid adjustments</a>. If the user is part of multiple audience lists, the audience list with the largest bid adjustment is selected. Ties among audiences with the largest bid adjustment are decided randomly. </td> </tr> <tr> <td><span translate="no">VERIFICATION</span></td> <td><span translate="no">Optional</span></td> <td>A boolean that verifies if the link was generated by Google for testing or automated validation. It is <code translate="no" dir="ltr">true</code> if the link was generated by Google for testing or automated validation, otherwise it is <code translate="no" dir="ltr">false</code>. </td> </tr> </tbody> </table> <h2 id="building-conditional" data-text="Conditional logic in URLs" tabindex="-1">Conditional logic in URLs</h2> <p>You can use special directives in the <code translate="no" dir="ltr"><URL></code> element of a landing pages file to conditionally build endpoints.</p> <p>The conditional logic supports the following statements:</p> <ul> <li><p><var translate="no">if_statement</var>: If <code translate="no" dir="ltr">true</code>, then the values that follow this condition are inserted into the URL, otherwise the values following the <code translate="no" dir="ltr">ELSE</code> directive are inserted.</p></li> <li><p><var translate="no">for_statement</var>: Creates a FOR loop condition that iterates on the number of values provided.</p></li> </ul> <p>IF and FOR statements include the following:</p> <table class="fixed"> <tbody> <tr> <th width="23%">Condition</th> <th width="18%">Recommended/optional</th> <th>Description</th> </tr> <tr> <td><span translate="no">IF-AD-CLICK</span> (Hotel Ads only)</td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user click originated from an ad. Resolves to <code translate="no" dir="ltr">false</code> if the user click originated from a free booking link.</td> </tr> <tr> <td><span translate="no">IF-CLICK-TYPE-HOTEL</span></td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user clicked on a listing for a hotel, otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">IF-CLICK-TYPE-ROOM</span></td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user clicked on a listing for a <a href="/hotels/hotel-prices/dev-guide/room-bundles"> Room Bundle</a>, otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">IF-CLOSE-RATE-RULE-IDS</span></td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if one or more conditional rates were unavailable because the user was ineligible, otherwise resolves to <code translate="no" dir="ltr">false</code>. By default, it is <code translate="no" dir="ltr">true</code>if a <a href="/hotels/hotel-prices/dev-guide/qualified-rates">private rate </a> UI treatment was shown to the user.</td> </tr> <tr> <td><span translate="no">IF-DEFAULT-RATE</span></td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user clicked on a hotel listing where default dates were used, otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">IF-HOTEL-CAMPAIGN</span></td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user click originated from a hotel campaign, otherwise resolves to <code translate="no" dir="ltr">false</code>. This distinction is helpful for partners that have multiple campaign types present in Google Ads to allocate attribution.</td> </tr> <tr> <td><span translate="no">IF-PAYMENT-ID</span> (Hotel Ads only)</td> <td><span translate="no">Recommended (if you use pay-per-stay Google Ads campaigns)</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> for hotels in the Pay-Per-Stay (PPS) commissions program otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">IF-PROMO-CODE</span></td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user clicked on a rate which is based on an ARI promotion or a rate rule with a given <code translate="no" dir="ltr">PromoCode</code>; otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">IF-PROMOTED</span> (Hotel Ads only)</td> <td><span translate="no">Recommended (if you use Promoted hotels)</span> </td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user clicked on a Property Promotion Ad, otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">IF-RATE-RULE-ID</span></td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user selected a <a href="/hotels/hotel-prices/dev-guide/fenced-rates">conditional rate </a>, otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">IF-USER-LIST-ID</span> (defined in Google Ads)</td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the user is a member of a Google Ads customer list ID you specified when setting bid multipliers for audience lists, otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">IF-VERIFICATION</span></td> <td><span translate="no">Optional</span></td> <td>Resolves to <code translate="no" dir="ltr">true</code> if the link was generated by Google for testing or automated validation, otherwise resolves to <code translate="no" dir="ltr">false</code>.</td> </tr> <tr> <td><span translate="no">ELSE</span></td> <td><span translate="no">Recommended (if you use any conditional IF statements)</span></td> <td>If the previous condition is not met, then the values that follow this condition are inserted into the URL.</td> </tr> <tr> <td><span translate="no">END-IF</span></td> <td><span translate="no">Optional (required if you have any IF conditional statements)</span></td> <td>Ends the <code translate="no" dir="ltr">IF</code> statement conditional block.</td> </tr> <tr> <td><span translate="no">FOR-EACH-CHILD-AGE</span></td> <td><span translate="no">Optional (required for child occupancy pricing) </span></td> <td>Executes one time for each <a href="https://developers.google.com/hotels/hotel-prices/xml-reference/transaction-messages#occupancydetails-children"> <code translate="no" dir="ltr"><Child "age"></code></a> element in the price feed. For example, if the <code translate="no" dir="ltr"><OccupancyDetails></code> include the two elements <code translate="no" dir="ltr"><Child age="17"></code> and <code translate="no" dir="ltr"><Child age= "17"></code>, then the directive executes two times.</td> </tr> <tr> <td><span translate="no">END-FOR-EACH</span></td> <td><span translate="no">Optional (required if using FOR-EACH block) </span></td> <td>Ends the <code translate="no" dir="ltr">FOR-EACH</code> statement conditional block.</td> </tr> </tbody> </table> <h3 id="if-ad-click" data-text="IF-AD-CLICK example" tabindex="-1">IF-AD-CLICK example</h3> <p>You can construct a conditional block that checks if the user clicked an ad or free booking link to redirect to your landing page.</p> <p>The following example uses this directive in a landing page file:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com?hid=(PARTNER-HOTEL-ID)<strong>(IF-AD-CLICK)</strong>&amp;adType=1<strong>(ELSE)</strong>&amp;adType=0<strong>(ENDIF)</strong></URL> </code></pre></devsite-code> <p>In this example, if the user <em>did not click</em> an ad, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hid=123&adType=0 </code></pre></devsite-code> <p>If the user <em>clicked</em> the ad, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hid=123&adType=1 </code></pre></devsite-code> <h3 id="if-type-hotel-example" data-text="IF-CLICK-TYPE-HOTEL example" tabindex="-1">IF-CLICK-TYPE-HOTEL example</h3> <p>You can construct a conditional block that checks if the user selected a hotel without an explicit Room Bundle. The value of <code translate="no" dir="ltr"><RatePlanID></code> element in the <code translate="no" dir="ltr"><Room Bundle></code> block of a Transaction message will be set to the implicitly associated room bundle price that the user had selected.</p> <p>The following example uses this directive in a landing pages file:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com/<strong>(IF-CLICK-TYPE-HOTEL)</strong>landing<strong>(ELSE)</strong>landing_room<strong>(ENDIF)</strong>?hid=(PARTNER-HOTEL-ID)</URL> </code></pre></devsite-code> <p>In this example, if the user selected a Room Bundle, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com/landing_room?hid=123 </code></pre></devsite-code> <p>If the user didn't select a Room Bundle, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com/landing?hid=123 </code></pre></devsite-code> <h3 id="if-type-room-example" data-text="IF-CLICK-TYPE-ROOM example" tabindex="-1">IF-CLICK-TYPE-ROOM example</h3> <p>You can construct a conditional block that checks if the user selected a Room Bundle.</p> <p>The following example uses this directive in a landing pages file:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com/<strong>(IF-CLICK-TYPE-ROOM)</strong>landing_room<strong>(ELSE)</strong>landing<strong>(ENDIF)</strong>?hid=(PARTNER-HOTEL-ID)</URL> </code></pre></devsite-code> <p>In this example, if the user didn't select a Room Bundle, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com/landing?hid=123 </code></pre></devsite-code> <p>If the user selected a Room Bundle, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com/landing_room?hid=123 </code></pre></devsite-code> <h3 id="if-default-date-example" data-text="IF-DEFAULT-DATE example" tabindex="-1">IF-DEFAULT-DATE example</h3> <p>Use the <code translate="no" dir="ltr">IF-DEFAULT-DATE</code> conditional statement to set a non-date parameter that your website can then use to trigger custom behavior if the user didn't select a date.</p> <p>The following example checks if the default date was used:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com?hotelID=(PARTNER-HOTEL-ID)&amp;checkinDay=(CHECKINDAY)&amp;checkinMonth=(CHECKINMONTH)&amp;checkinYear=(CHECKINYEAR)&amp;nights=(LENGTH)<strong>(IF-DEFAULT-DATE)</strong>&amp;popup_datepicker=true<strong>(ELSE)</strong>&amp;popup_datepicker=false<strong>(ENDIF)</strong></URL> </code></pre></devsite-code> <p>In this example, if the user didn't select a date, the result might be similar to the following URL that shows default date selections:</p> <div></div><devsite-code><pre class="wrap-code devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com?hotelID=123&checkinDay=23&checkinMonth=05&checkinYear=2023&nights=1&popup_datepicker=true </code></pre></devsite-code> <p>If the user selected a date, the result might be similar to the following URL, depending on the itinerary they selected:</p> <div></div><devsite-code><pre class="wrap-code devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com?hotelID=123&checkinDay=23&checkinMonth=05&checkinYear=2023&nights=2&popup_datepicker=false </code></pre></devsite-code> <h3 id="if-hotel-campaign-example" data-text="IF-HOTEL-CAMPAIGN example (Hotel ads and free booking links clicks)" tabindex="-1">IF-HOTEL-CAMPAIGN example (Hotel ads and free booking links clicks)</h3> <p>You can construct a conditional block that checks if the user clicked an ad that originated from a hotel campaign.</p> <p>The following example uses this directive in a landing page file:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com?hotelID=(PARTNER-HOTEL-ID)<strong>(IF-HOTEL-CAMPAIGN)</strong>&amp;hotel_campaign=(CAMPAIGN-ID)<strong>(ELSE)</strong>utm_campaign=(CAMPAIGN-ID)<strong>(ENDIF)</strong></URL> </code></pre></devsite-code> <p>In this example, if the user clicks on a hotel campaign URL, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hotelID=123&hotel_campaign=12345678 </code></pre></devsite-code> <p>If the click is not on a hotel campaign URL (e.g. regular search campaign), the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hotelID=123&utm_campaign=87654321 </code></pre></devsite-code> <p>This is useful when you want to distinguish the traffic of hotel campaign clicks from any other clicks.</p> <h4 id="blank-campaign-id-fbl-example" data-text="Blank CAMPAIGN-IDs with FBL clicks" tabindex="-1">Blank CAMPAIGN-IDs with FBL clicks</h4> <p>If the click is from a free booking link, then <code translate="no" dir="ltr">IF-HOTEL-CAMPAIGN</code> returns <code translate="no" dir="ltr">TRUE</code> and <code translate="no" dir="ltr">CAMPAIGN-ID</code> value is set to blank as shown in the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hotelID=123&hotel_campaign= </code></pre></devsite-code> <p>You can use <code translate="no" dir="ltr">IF-AD-CLICK</code> conditional statement to prevent blank campaign ID as shown in the following example:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com?hotelID=(PARTNER-HOTEL-ID)<strong>(IF-HOTEL-CAMPAIGN)(IF-AD-CLICK)</strong>&amp;hotel_campaign=(CAMPAIGN-ID)<strong>(ELSE)</strong>&amp;FreeBookingLink<strong>(ENDIF)(ELSE)</strong>utm_campaign=(CAMPAIGN-ID)<strong>(ENDIF)</strong></URL> </code></pre></devsite-code> <h3 id="if-payment-id-example" data-text="IF-PAYMENT-ID example (Hotel Ads only)" tabindex="-1">IF-PAYMENT-ID example (Hotel Ads only)</h3> <p>Use the <code translate="no" dir="ltr">IF-PAYMENT-ID</code> conditional statement to vary the URL based on whether the click is a result of the PPS commissions program or not. The example below checks if a click came from the PPS commissions program and assigns a value to the <code translate="no" dir="ltr">booking_source</code> parameter based on the result:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com?hid=<strong>(PARTNER-HOTEL-ID)</strong>&amp;booking_source=<strong>(IF-PAYMENT-ID)(PAYMENT-ID)(ELSE)</strong>cpc<strong>(ENDIF)</strong></URL> </code></pre></devsite-code> <p>If the hotel is part of the Commissions program, the result is one of the following URLs:</p> <ul> <li><dl> <dt>If no IATA number has been assigned to Google:</dt> <dd><code translate="no" dir="ltr">https://partner.com?hid=123&amp;booking_source=commissions</code></dd> </dl></li> <li><dl> <dt>If an IATA number has been assigned to Google:</dt> <dd><code translate="no" dir="ltr">https://partner.com?hid=123&amp;booking_source=01234567</code></dd> </dl></li> </ul> <p>Otherwise, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com?hid=123&booking_source=cpc </code></pre></devsite-code> <h3 id="if-promoted-example" data-text="IF-PROMOTED example (Hotel Ads only)" tabindex="-1">IF-PROMOTED example (Hotel Ads only)</h3> <p>You can construct a conditional block that checks if the user clicked on a Property Promotion Ad.</p> <p>The following example uses this directive in a landing pages file:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com/<strong>(IF-PROMOTED)</strong>1<strong>(ELSE)</strong>0<strong>(ENDIF)</strong>?hid=(PARTNER-HOTEL-ID)</URL> </code></pre></devsite-code> <p>In this example, if the user selected a Property Promotion Ad, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com/1?hid=123 </code></pre></devsite-code> <p>If the user didn't select a Property Promotion Ad, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://partner.com/0?hid=123 </code></pre></devsite-code> <h3 id="if-rate-rule-id_example" data-text="IF-RATE-RULE-ID example" tabindex="-1">IF-RATE-RULE-ID example</h3> <p>You can construct a conditional block that checks if the user selected a conditional rate and if that is the case then the value of the <code translate="no" dir="ltr"><RateRuleID></code> element in the <code translate="no" dir="ltr"><Rate></code> block of the transaction message is used.</p> <p>The following example uses this directive in a landing pages file:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com?hid=(PARTNER-HOTEL-ID)<strong>(IF-RATE-RULE-ID)</strong>&amp;customerType=42<strong>(ELSE)(ENDIF)</strong></URL> </code></pre></devsite-code> <p>In this example, if the user did not select a conditional rate, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hid=123 </code></pre></devsite-code> <p>If the user selected a conditional rate, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hid=123&customerType=42 </code></pre></devsite-code> <h3 id="if-user-list-example" data-text="IF-USER-LIST-ID example (defined in Google Ads)" tabindex="-1">IF-USER-LIST-ID example (defined in Google Ads)</h3> <p>If you set bid multipliers for audience lists in a hotel campaign in Google Ads, you can use <code translate="no" dir="ltr">IF-USER-LIST-ID</code> in conjunction with <code translate="no" dir="ltr">USER-LIST-ID</code> to set a parameter on your website for a customer who belongs to a certain Google Ads audience list. You may want to do so for tracking purposes or to customize your website for members of audience lists.</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com/?hid=(PARTNER-HOTEL-ID)<strong>(IF-USER-LIST-ID)</strong>&amp;audience_list=<strong>(USER-LIST-ID)(ELSE)(ENDIF)</strong></URL> </code></pre></devsite-code> <p>In this example, if the user wasn't a member of an audience list, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hid=123 </code></pre></devsite-code> <p>If the user was a member of the audience list <code translate="no" dir="ltr">12345678</code>, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hid=123&audience_list=12345678 </code></pre></devsite-code> <h3 id="if-verification-example" data-text="IF-VERIFICATION example" tabindex="-1">IF-VERIFICATION example</h3> <p>If you need to check whether Google generated the URL for testing or automated validation, you can use <code translate="no" dir="ltr">IF-VERIFICATION</code>.</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com/?hid=(PARTNER-HOTEL-ID)<strong>(IF-VERIFICATION)</strong>&amp;isgoogle=true<strong>(ENDIF)</strong></URL> </code></pre></devsite-code> <p>In this example, if Google didn't generate the URL for testing or validation, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hid=123 </code></pre></devsite-code> <p>If Google generated the URL for testing or validation, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?hid=123&isgoogle=true </code></pre></devsite-code> <h3 id="for-each-child-age-example" data-text="FOR-EACH-CHILD-AGE example" tabindex="-1">FOR-EACH-CHILD-AGE example</h3> <p>You can construct a conditional block that populates the maximum age of each child occupant, as specified in the Hotel Price Feed.</p> <p>The following example uses this directive in a landing pages file:</p> <div></div><devsite-code><pre class="devsite-click-to-copy devsite-code-highlight wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://partner.com?adults=(NUM-ADULTS)&amp;children=(NUM-CHILDREN)<strong>(FOR-EACH-CHILD-AGE)</strong>&amp;age=(CHILD-INDEX)_(CHILD-AGE)<strong>(END-FOR-EACH)</strong>&amp;hid=(PARTNER-HOTEL-ID)&amp;</URL> </code></pre></devsite-code> <p>In this example, if the itinerary had 2 adults and 2 children with ages 0 and 17 respectively, the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?adults=2&children=2&age=0_0age=1_17&hid=123 </code></pre></devsite-code> <p>If the itinerary had 2 adults and 0 children then the result is the following URL:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partner.com?adults=2&children=0&hid=123 </code></pre></devsite-code> <h2 id="building-rules" data-text="General rules when building URLs" tabindex="-1">General rules when building URLs</h2> <p>All variables are optional. You are not required to insert any variables in your landing page URL. However, using variables to pass itinerary and user information generally creates a better experience for the user and aids you in conforming to Google's policies.</p> <p>The following general rules apply when defining constructed URLs in a landing pages file:</p> <ul> <li><p>All variables are surrounded with open and close parentheses.</p></li> <li><p>Query string parameters must be separated by an ampersand ("&") in the final output. Because the ampersand is a special character in XML and the landing pages file format <em>is XML</em>. Therefore, you must use the encoded entity "&amp;" in its place. The final output renders an actual "&" character. For example:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr"><!-- Do this: --> <URL>https://www.partnerdomain.com?hotelID=(PARTNER-HOTEL-ID)<strong>&amp;</strong>nights=(LENGTH)</URL> <!-- Do NOT do this: --> <URL>https://www.partnerdomain.com?hotelID=(PARTNER-HOTEL-ID)<strong>&</strong>nights=(LENGTH)</URL> </code></pre></devsite-code> <p>You must also URL-encode special characters that you might include in the landing page URL. For example:</p> <ul> <li>space (" "): Replace space characters with "%20;" in the <code translate="no" dir="ltr"><URL></code> element</li> <li>forward slash ("/"): Replace forward slashes with "%2F;" in the <code translate="no" dir="ltr"><URL></code> element</li> </ul> <p>Not all non-alphabetical characters must be URL encoded. For example, hyphens ("-") doesn't need to be URL encoded. For a list of common characters that must be URL encoded, consult <a href="/maps/url-encoding">URL Encoding</a>.</p></li> <li><p>Values for a single parameter can be constructed from multiple variables. The following example constructs a single parameter, <code translate="no" dir="ltr">checkinDate</code>, from the <code translate="no" dir="ltr">CHECKINDAY</code>,<code translate="no" dir="ltr">CHECKINMONTH</code>, and <code translate="no" dir="ltr">CHECKINYEAR</code> variables:</p> <div></div><devsite-code><pre class="devsite-click-to-copy wrap-code" translate="no" dir="ltr" is-upgraded syntax="XML"><code translate="no" dir="ltr"><URL>https://www.partnerdomain.com?checkinDate=(CHECKINDAY)%2F;(CHECKINMONTH)%2F;(CHECKINYEAR)</URL> </code></pre></devsite-code> <p>This example results in a URL that might look like the following:</p> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded><code translate="no" dir="ltr">https://www.partnerdomain.com?checkinDate=7/23/1971 </code></pre></devsite-code></li> <li><p>You can use any ID for the name of the query string parameters. Your server processes these values. However, the values that you pass are limited to the <a href="/hotels/hotel-prices/dev-guide/pos-urls#building-variables">list of available variables</a>.</p></li> <li><p>You can use up to five custom variables in addition to the list of available variables.</p></li> </ul> </div> <devsite-recommendations display="in-page" hidden yield> </devsite-recommendations> <devsite-thumb-rating position="footer"> </devsite-thumb-rating> <devsite-feedback position="footer" project-name="Hotel Prices" product-id="82128" bucket="Hotels" context="DevSite feedback link" version="t-devsite-webserver-20241114-r00-rc02.464922260396498922" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="footer" class="nocontent" project-feedback-url="https://support.google.com/hotelprices/" project-icon="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/touchicon-180-new.png" project-support-url="https://support.google.com/hotelprices/" > <button> Send feedback </button> </devsite-feedback> <devsite-recommendations id="recommendations-link" yield></devsite-recommendations> <div class="devsite-floating-action-buttons"> </div> </article> <devsite-content-footer class="nocontent"> <p>All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.</p> <p>Last updated 2024-10-21 UTC.</p> </devsite-content-footer> <devsite-notification > </devsite-notification> <div class="devsite-content-data"> <template class="devsite-thumb-rating-feedback"> <devsite-feedback position="thumb-rating" project-name="Hotel Prices" product-id="82128" bucket="Hotels" context="DevSite feedback link" version="t-devsite-webserver-20241114-r00-rc02.464922260396498922" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="thumb-rating" class="nocontent" project-feedback-url="https://support.google.com/hotelprices/" project-icon="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/touchicon-180-new.png" project-support-url="https://support.google.com/hotelprices/" > <button> Need to tell us more? </button> </devsite-feedback> </template> <template class="devsite-content-data-template"> [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-21 UTC."],[],[]] </template> </div> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> <ul class="devsite-footer-linkboxes-list"> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Connect</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//googledevelopers.blogspot.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Blog </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://www.instagram.com/googlefordevs/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Instagram </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://www.linkedin.com/showcase/googledevelopers/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > LinkedIn </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//twitter.com/googledevs" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > X (Twitter) </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//www.youtube.com/user/GoogleDevelopers" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > YouTube </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Programs</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//www.womentechmakers.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Women Techmakers </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/community/gdg" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Google Developer Groups </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/community/experts" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Google Developer Experts </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/community/accelerators" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Accelerators </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/community/gdsc" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Google Developer Student Clubs </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Developer consoles</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//console.developers.google.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Google API Console </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//console.cloud.google.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Google Cloud Platform Console </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//play.google.com/apps/publish" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Google Play Console </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//console.firebase.google.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Firebase Console </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//console.actions.google.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Actions on Google Console </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//cast.google.com/publish" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > Cast SDK Developer Console </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//chrome.google.com/webstore/developer/dashboard" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 7)" > Chrome Web Store Dashboard </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//console.home.google.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 8)" > Google Home Developer Console </a> </li> </ul> </li> </ul> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-sites" aria-label="Other Google Developers websites"> <a href="https://developers.google.com/" class="devsite-footer-sites-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Developers Link"> <picture> <img class="devsite-footer-sites-logo" src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/lockup-google-for-developers.svg" loading="lazy" alt="Google Developers"> </picture> </a> <ul class="devsite-footer-sites-list"> <li class="devsite-footer-sites-item"> <a href="//developer.android.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Android Link" > Android </a> </li> <li class="devsite-footer-sites-item"> <a href="//developer.chrome.com/home" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Chrome Link" > Chrome </a> </li> <li class="devsite-footer-sites-item"> <a href="//firebase.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Firebase Link" > Firebase </a> </li> <li class="devsite-footer-sites-item"> <a href="//cloud.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Cloud Platform Link" > Google Cloud Platform </a> </li> <li class="devsite-footer-sites-item"> <a href="//ai.google.dev/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google AI Link" > Google AI </a> </li> <li class="devsite-footer-sites-item"> <a href="/products" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer All products Link" > All products </a> </li> </ul> </nav> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/terms/site-terms" data-category="Site-Wide Custom Events" data-label="Footer Terms link" > Terms </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link" > Privacy </a> </li> <li class="devsite-footer-utility-item glue-cookie-notification-bar-control"> <a class="devsite-footer-utility-link gc-analytics-event" href="#" data-category="Site-Wide Custom Events" data-label="Footer Manage cookies link" aria-hidden="true" > Manage cookies </a> </li> <li class="devsite-footer-utility-item devsite-footer-utility-button"> <span class="devsite-footer-utility-description">Sign up for the Google for Developers newsletter</span> <a class="devsite-footer-utility-link gc-analytics-event" href="/newsletter/subscribe" data-category="Site-Wide Custom Events" data-label="Footer Subscribe link" > Subscribe </a> </li> </ul> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es" >Español</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> </nav> </div> </devsite-footer-utility> <devsite-panel></devsite-panel> <devsite-concierge data-info-panel data-ai-panel data-api-explorer-panel > </devsite-concierge> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip ></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics> <script type="application/json" analytics>[{"dimensions": {"dimension3": false, "dimension6": "en", "dimension11": false, "dimension5": "en", "dimension4": "Hotel Prices", "dimension1": "Signed out"}, "gaid": "UA-24532603-1", "metrics": {"ratings_count": "metric2", "ratings_value": "metric1"}, "purpose": 1}]</script> <script type="application/json" tag-management>{"at": "True", "ga4": [{"id": "G-272J68FCRF", "purpose": 1}], "ga4p": [{"id": "G-272J68FCRF", "purpose": 1}], "gtm": [], "parameters": {"internalUser": "False", "language": {"machineTranslated": "False", "requested": "en", "served": "en"}, "pageType": "article", "projectName": "Hotel Prices", "signedIn": "False", "tenant": "developers", "recommendations": {"sourcePage": "", "sourceType": 0, "sourceRank": 0, "sourceIdenticalDescriptions": 0, "sourceTitleWords": 0, "sourceDescriptionWords": 0, "experiment": ""}, "experiment": {"ids": ""}}}</script> </devsite-analytics> <devsite-badger></devsite-badger> <script nonce="2fgCcKB6/iVyDRxq2uoIYAF0jVVJHQ"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/js/app_loader.js', '[1,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers","https://developers-dot-devsite-v2-prod.appspot.com",null,null,["/_pwa/developers/manifest.json","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/favicon-new.png","https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,112,113,116,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,147,148,149,151,152,156,157,158,159,161,163,164,168,169,170,179,180,182,183,186,191,193,196],"AIzaSyAP-jjEJBzmIyKR4F-3XITp8yM9T1gEEI8","AIzaSyB6xiKGDR5O3Ak2okS4rLkauxGUG7XP0hg","developers.google.com","AIzaSyAQk0fBONSGUqCNznf6Krs82Ap1-NV6J4o","AIzaSyCCxcqdrZ_7QMeLCRY20bh_SXdAYqy70KY",null,null,null,["DevPro__enable_developer_subscriptions","Cloud__enable_cloudx_ping","MiscFeatureFlags__emergency_css","Profiles__enable_page_saving","Search__enable_dynamic_content_confidential_banner","Cloud__enable_cloud_facet_chat","Cloud__enable_cloudx_experiment_ids","DevPro__enable_cloud_innovators_plus","Profiles__enable_completecodelab_endpoint","Profiles__enable_profile_collections","Cloud__enable_llm_concierge_chat","CloudShell__cloud_shell_button","EngEduTelemetry__enable_engedu_telemetry","Concierge__enable_concierge_restricted","BookNav__enable_tenant_cache_key","Concierge__enable_pushui","Experiments__reqs_query_experiments","Significatio__enable_by_tenant","MiscFeatureFlags__developers_footer_image","Concierge__enable_concierge","TpcFeatures__enable_mirror_tenant_redirects","MiscFeatureFlags__enable_variable_operator","Search__enable_page_map","MiscFeatureFlags__enable_firebase_utm","Search__enable_ai_search_summaries","Cloud__enable_cloud_shell","Cloud__enable_cloud_dlp_service","Search__enable_ai_search_summaries_restricted","Profiles__enable_release_notes_notifications","MiscFeatureFlags__developers_footer_dark_image","Profiles__enable_recognition_badges","Profiles__enable_awarding_url","Profiles__enable_complete_playlist_endpoint","MiscFeatureFlags__enable_explain_this_code","Cloud__enable_legacy_calculator_redirect","Cloud__enable_free_trial_server_call","Profiles__require_profile_eligibility_for_signin","Search__enable_suggestions_from_borg","Profiles__enable_dashboard_curated_recommendations","Cloud__enable_cloud_shell_fte_user_flow","Profiles__enable_public_developer_profiles","Analytics__enable_clearcut_logging","TpcFeatures__enable_required_headers","Search__enable_ai_eligibility_checks","MiscFeatureFlags__enable_view_transitions","CloudShell__cloud_code_overflow_menu","MiscFeatureFlags__enable_project_variables","Profiles__enable_developer_profiles_callout"],null,null,"AIzaSyBLEMok-5suZ67qRPzx0qUtbnLmyT_kCVE","https://developerscontentserving-pa.clients6.google.com","AIzaSyCM4QpTRSqP5qI4Dvjt4OAScIN8sOUlO-k","https://developerscontentsearch-pa.clients6.google.com",1,4,null,"https://developerprofiles-pa.clients6.google.com",[1,"developers","Google for Developers","developers.google.com",null,"developers-dot-devsite-v2-prod.appspot.com",null,null,[1,1,[1],null,null,null,null,null,null,null,null,[1],null,null,null,null,null,null,[1],[1,null,null,[1,20],"/recommendations/information"],null,null,null,[1,1,1],[1,1,null,1,1]],null,[null,null,null,null,null,null,"/images/lockup-new.svg","/images/touchicon-180-new.png",null,null,null,null,1,null,null,null,null,null,null,null,null,1,null,null,null,"/images/lockup-dark-theme-new.svg",[]],[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[6,1,14,15,20,22,23,29,32,36],null,[[null,null,null,[3,7,10,2,39,17,4,32,24,11,12,13,34,15,25],null,null,[1,[["docType","Choose a content type",[["Tutorial",null,null,null,null,null,null,null,null,"Tutorial"],["Guide",null,null,null,null,null,null,null,null,"Guide"],["Sample",null,null,null,null,null,null,null,null,"Sample"]]],["product","Choose a product",[["Android",null,null,null,null,null,null,null,null,"Android"],["ARCore",null,null,null,null,null,null,null,null,"ARCore"],["ChromeOS",null,null,null,null,null,null,null,null,"ChromeOS"],["Firebase",null,null,null,null,null,null,null,null,"Firebase"],["Flutter",null,null,null,null,null,null,null,null,"Flutter"],["Assistant",null,null,null,null,null,null,null,null,"Google Assistant"],["GoogleCloud",null,null,null,null,null,null,null,null,"Google Cloud"],["GoogleMapsPlatform",null,null,null,null,null,null,null,null,"Google Maps Platform"],["GooglePay",null,null,null,null,null,null,null,null,"Google Pay & Google Wallet"],["GooglePlay",null,null,null,null,null,null,null,null,"Google Play"],["Tensorflow",null,null,null,null,null,null,null,null,"TensorFlow"]]],["category","Choose a topic",[["AiAndMachineLearning",null,null,null,null,null,null,null,null,"AI and Machine Learning"],["Data",null,null,null,null,null,null,null,null,"Data"],["Enterprise",null,null,null,null,null,null,null,null,"Enterprise"],["Gaming",null,null,null,null,null,null,null,null,"Gaming"],["Mobile",null,null,null,null,null,null,null,null,"Mobile"],["Web",null,null,null,null,null,null,null,null,"Web"]]]]]],[1,1],null,1],[[["UA-24532603-1"],["UA-22084204-5"],null,null,["UA-24532603-5"],null,null,[["G-272J68FCRF"],null,null,[["G-272J68FCRF",2]]],[["UA-24532603-1",2]],null,[["UA-24532603-5",2]],null,1],[[12,9],[5,4],[3,2],[14,11],[15,12],[16,13],[11,8],[6,5],[1,1],[4,3],[13,10]],[[2,2],[1,1]]],null,4,null,null,null,null,null,null,null,null,null,null,null,null,null,"developers.devsite.google"],null,"pk_live_5170syrHvgGVmSx9sBrnWtA5luvk9BwnVcvIi7HizpwauFG96WedXsuXh790rtij9AmGllqPtMLfhe2RSwD6Pn38V00uBCydV4m"]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html>