> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.aloha.co/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Set Up Your Widget on Your Website

## Steps to Install the Widget on Your Website

The Aloha widget allows you to easily integrate the booking system into your website, providing customers with a quick and simple way to book their stays. Its installation is simple and does not require advanced programming knowledge.

Below, we explain step by step how to add it to your website.

## Step 1 - Add the Stylesheet

To ensure the widget displays correctly, you need to include the stylesheet in your webpage.

📌 Copy and paste the provided link inside the `<head>` section of your site. 📌  
​  
​<link rel="stylesheet" href="[https://booking-widget.aloha.co/aloha-booking-widget.css"/](https://ayuda.alojate.pro/'%20rel=)>

[![](https://storage.crisp.chat/users/helpdesk/website/-/f/e/3/1/fe31fde8c3f09000/c6bd0713-06b8-4918-b5f0-d257d8_10rdl5m.png)](https://downloads.intercomcdn.com/i/o/qn4880pe/1357925265/c8375e9656c2762129a2244787ce/htps+1.png?expires=1752705000&signature=b40d00e5173e80ad39d8035883027858248e0bdde750a2456313f26061dcdfb7&req=dSMiEcB8mINZXPMW1HO4zSjZUCoU6F0JFF1WI2UdPBHi9KxdF1GQXoR30PkU%0AGdSZhAvAsAPD7EDuJqg%3D%0A)

## Step 2 - Add the Widget Container

📌 This container is where the widget will be displayed on your website.

Place it before the closing `</body>` tag of your site. 📌  
​  
​ ***<div id="aloha-widget"></div>***

[![](https://storage.crisp.chat/users/helpdesk/website/-/a/f/2/5/af259c8fa259a000/856184fb-f112-435a-b64b-c76246_1ol9fps.png)](https://downloads.intercomcdn.com/i/o/qn4880pe/1357927214/64726ac00901ff24e826e7f7cb52/htms+2.png?expires=1752705000&signature=77e50911b30bbb9042cf81cea48e501db02cffa4f1da655367d9e9e4e30dec58&req=dSMiEcB8moNeXfMW1HO4zV%2FprpmQ%2BqokT6v%2F7XV2oSW27sk4%2BYo%2Fju5Acrli%0ALDXPzpeI1RZaL8yWqQY%3D%0A)

## Step 3 - Assign a Unique ID to the Button to Open the Widget

To make the widget open when clicking on a specific button, you first need to assign it a unique ID. In Elementor, follow these steps:

1. Open the Elementor editor and select the button you want to use.
2. In the left sidebar, go to the “Content” section.
3. In the "Button ID" field, assign a unique ID (e.g., `btn-widget`).

[![](https://storage.crisp.chat/users/helpdesk/website/-/9/0/c/a/90cad014e4c1000/6a8cb641-41cd-41af-9d16-3e17f0_up5aqp.png)](https://downloads.intercomcdn.com/i/o/qn4880pe/1357927402/598a11c58446d755b8bd4a9e223b/htms+3.png?expires=1752705000&signature=08c0c9c194d9d035cd98a7324f5b9c5ca9c5ea0b8121f253970dbe351744d5a2&req=dSMiEcB8moVfW%2FMW1HO4zfy9Pzucy%2FXybIcpX%2BNrFVVhAnJvyEBUuHXV2W%2FM%0ARPI8AirIJr011rWtqHc%3D%0A)

#### This ID is essential for linking the button to the script that will open the booking widget.

## Step 4 - Get the Property Secret Key and Add the Script

The property secret key is necessary to authenticate the widget on your site. To obtain it:

1. Go to **Manage System** in your admin panel.
2. Select **Widget**.
Copy the **"Property Identification Key"** shown there.

[![](https://storage.crisp.chat/users/helpdesk/website/-/c/e/2/0/ce20e3b5a903a800/1273e613-b72a-4ebd-b574-74287b_93iqso.png)](https://downloads.intercomcdn.com/i/o/qn4880pe/1357930041/19590c1e0f3472bd467e73103e3b/htms+4.png?expires=1752705000&signature=1e9d4858fc50a0cbababef9b67526b84d08e0730f1864a43fce61a06073d141f&req=dSMiEcB9nYFbWPMW1HO4zTjFuadQofZQudgT7kVvC6okR4guWxhv8C7G0jVF%0A7kmK%0A)

## Step 5 - Add the Widget Script and Configure It

Once the button ID is set, add the script to load and open the widget when clicked.

Insert the provided script before the closing `</body>` tag of your website.

Make sure to replace `'YOUR_SECRET_KEY_HERE'` with the secret key of your property.  
​  
📌 Copy and paste this code into the appropriate area:  
​  
​_<!-- Widget Aloha no tocar -->_

<script type="text/javascript" src="[https://booking-widget.aloha.co/aloha-booking-widget.umd.js"></script](https://app.intercom.com/%3E%3C/script'%20rel=)>

*<script>*

*var alohaObject = new AlohaBookingWidget({*

*key:*`'YOUR_SECRET_KEY_HERE'`

*});*

*var button = document.getElementById('btn-widget'); // Este es el ID único asignado al botón*

*// Agregar un event listener al botón*

*button.addEventListener('click', function (e) {*

*e.preventDefault();*

*// Llamar al método para abrir el widget cuando se hace clic en el botón*

*alohaObject.open();*

*});*

*</script>*  
​  
​  
With this setup, when your guests click the button with the ID `btn-widget`, the Aloha widget will open correctly.

[![](https://storage.crisp.chat/users/helpdesk/website/-/9/1/2/e/912e9e4d323f880/92805452-a364-4d0b-81a1-5b3489_1yml5l9.png)](https://downloads.intercomcdn.com/i/o/qn4880pe/1357933245/2cb5a91bca7eda8d87774d5e90f4/5+correctamente.png?expires=1752705000&signature=1fa819e699e5d170b3dfb03a6bd21f31f63c43e832ab1cf567810609e3528854&req=dSMiEcB9noNbXPMW1HO4zcaEHSEeRFRVH7SKSdNUSYhZ3JrtPDi7TJtbQKhm%0ALJ1XSKgn7vJ%2BqLB0veU%3D%0A)

Make sure to replace `'YOUR_SECRET_KEY_HERE'` with the secret key of your property that you obtained from the system.