Grab the CSS, HTML and Javascript below and modify as needed.
<style>
section and place it in the <head>
section of your page.
!important
to override some rules.<script>
section and place it wrapped by the <body>
section of your page
inmediately before the closing </body>
tag.submission_url
to point to your RootRez-hosted booking site. Want to customize
your submission url to default to an advanced search? Let us know and we can provide the custom links to get your
customer the most appropriate search results.data-publisher_key
to match your specific RootRez API key.value_add_code
to match the code you want to apply to every user. Leave this blank to show a
list of available value adds and discounts. Note: Value add list is displayed after selecting a stay date range, and
only shows those value adds which are valid in the chosen date range.data-locale
value to one of the
available translations. Currently available translations are: "en-us" for English, and "fr-ca" for French.results_in_new_tab
value for true (new window/tab) or false (current window/tab). Defaults to false.<div id="RootRezWidget"></div>
container on your page wherever you want our
widget to appear.
# place in your page's head section
<style>
.container {
max-width: 800px;
}
:root {
--primary-color: orange;
--secondary-color: pink;
--book-font: 'Roboto Condensed',-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--border-radius: 200px;
--border-color: #ececec;
--form-border: 1px solid #ececec;
--box-shadow: none;
}
#RootRezWidget{
// should inherit your site's fonts, but can add here if needed. Example lines:
/* font-family: var(--book-font);
box-shadow: none !important; */
}
// uncomment and modify to override title alignment, colors, fonts, etc.
/* #widget-title {
font-size: 2em;
font-weight: bold;
text-align: left !important;
}
#widget-tagline {
font-size: 1.2em;
text-align: left !important;
} */
</style>
# place inside your html body near the bottom
<script>
(function (window, document) {
let loader = function () {
// required (update with your lodging subdomain):
let submission_url = "https://lodging.visitsaltlake.com/search";
// optional widget title. replace with empty strings to remove.
let title_text = "Book Your Downtown Lodging Here";
let tagline_text = "Simply put, nobody knows Salt Lake better, ";
tagline_text += "has lower rates or a better selection of incredible ";
tagline_text += "hotels and lodging. Search & book with locals.";
// optional (these values can be left empty):
let default_checkin = ""; // MM/DD/YYYY (e.g. 06/07/2020)
let default_checkout = ""; // MM/DD/YYYY (e.g. 06/15/2020)
let min_checkin = ""; // MM/DD/YYYY (e.g. 06/01/2020)
let max_checkout = ""; // MM/DD/YYYY (e.g. 06/28/2020)
let value_add_code = ""; //Leave blank. This is for optionally overriding available value-adds.
let results_in_new_tab = true; // true = opens results in a new window/tab ; false = opens results in the current window/tab
let s = document.createElement("script"), t = document.getElementsByTagName("script")[0];
s.id = "rootrezScript";
s.src = "https://assets.rootrez.com/book-your-stay/widget.min.js";
s.setAttribute("data-default_checkin", default_checkin);
s.setAttribute("data-default_checkout", default_checkout);
s.setAttribute("data-min_checkin",min_checkin);
s.setAttribute("data-publisher_key","YOUR API KEY HERE");
s.setAttribute("data-max_checkout",max_checkout);
s.setAttribute("data-submission_url",submission_url);
s.setAttribute("data-title_text",title_text);
s.setAttribute("data-tagline_text", tagline_text);
s.setAttribute("data-value_add_code", value_add_code);
s.setAttribute("data-api_url", "https://svc.rootrez.com");
s.setAttribute("data-locale", "en-us"); //Default: en-us. Also available: fr-ca
s.setAttribute("data-results_in_new_tab", results_in_new_tab);
t.parentNode.insertBefore(s, t);
};
window.addEventListener
? window.addEventListener("load", loader, false)
: window.attachEvent("onload", loader);
})(window, document);
</script>
# place wherever you want the widget to appear
<div id="RootRezWidget"></div>