Widget Embedding Guide
Add the Servegalo booking widget to any website using a single <script> tag. No backend required, no complex integration. Clients can book directly from your site without leaving the page.
Prerequisites
Before embedding, make sure you have at least one service and one staff member configured in your dashboard. Set those up first →
Step 1 — Get your Business ID
Your Business ID is a unique identifier that connects the widget to your Servegalo account. You'll find it in the dashboard:
- Log in to your Servegalo dashboard
- Navigate to Settings → Integrations
- Copy the value shown under Business ID — it looks like
biz_a1b2c3d4
Keep your Business ID safe
Your Business ID is safe to include in public HTML — it is not a secret key. However, only share it in your embed code, not in support tickets or public forums.
Step 2 — Add the script tag
Paste the following snippet just before the closing </body> tag on every page where you want the booking widget to appear.
<script
src="https://widget.servegalo.com/booking.js"
data-business-id="YOUR_BUSINESS_ID"
defer
></script> Replace YOUR_BUSINESS_ID with the ID you copied from the dashboard. The widget will render automatically — a floating "Book Now" button will appear in the bottom-right corner of the page.
Configuration Reference
The widget is configured entirely through data-* attributes on the script tag. No JavaScript configuration object is required.
| Attribute | Type | Default | Required | Description |
|---|---|---|---|---|
| data-business-id | string | — | Required | Your unique business identifier from the dashboard. |
| data-theme | "light" | "dark" | "auto" | "auto" | Optional | Color scheme. "auto" follows the visitor's OS preference. |
| data-color | hex string | "#7C6FFF" | Optional | Primary accent color used for buttons, selections, and highlights. Use your brand color. |
| data-position | "bottom-right" | "bottom-left" | "bottom-right" | Optional | Corner position of the floating booking button. |
| data-label | string | "Book Now" | Optional | Text shown on the floating button. Max 20 characters recommended. |
| data-locale | BCP 47 tag | "en" | Optional | Language locale for widget text. Supported: en, es, fr, de. |
| data-deposit-only | boolean | "false" | Optional | When "true", only services with deposit amounts configured are shown in the widget. |
Example with all options configured:
<script
src="https://widget.servegalo.com/booking.js"
data-business-id="biz_a1b2c3d4"
data-theme="auto"
data-color="#7C6FFF"
data-position="bottom-right"
data-label="Book Now"
data-locale="en"
defer
></script>Platform-specific guides
Select your platform below for exact instructions on where to paste the script tag.
- Open the HTML file for any page where you want the widget.
- Find the closing
</body>tag near the bottom of the file. - Paste the script tag immediately before it.
- Save and deploy your changes.
<!-- ... rest of your page ... -->
<script
src="https://widget.servegalo.com/booking.js"
data-business-id="YOUR_BUSINESS_ID"
defer
></script>
</body>
</html>Customization
The widget automatically adapts to your brand using the data-color and data-theme attributes. No CSS overrides are needed or supported — the widget is designed to look polished on any site.
Matching your brand color
Set data-color to any hex color. The widget uses this color for the booking button, selected states, progress indicators, and CTAs. High-contrast colors (avoid very light colors like #FFFFFF) produce the best results.
<script
src="https://widget.servegalo.com/booking.js"
data-business-id="YOUR_BUSINESS_ID"
data-color="#D4A853" ← your brand color
defer
></script>Dark mode
Set data-theme="dark" to always show the dark widget regardless of OS preference, or data-theme="auto" (the default) to follow the visitor's system setting.
Testing your widget
After adding the script tag, verify the widget is working correctly:
- Open your website in a regular browser window (not incognito, not the platform's preview mode).
- Look for the floating button in the bottom-right corner (or wherever you configured
data-position). It should appear within 1–2 seconds of page load. - Click the button and complete a test booking using a test email address. The booking should appear in your dashboard under Bookings.
- If you have Stripe test mode enabled, use the card number
4242 4242 4242 4242with any future expiry and any 3-digit CVC to test the deposit flow. - Check that a confirmation email was received at the test email address (if email is configured), and that a confirmation SMS was sent (if Twilio is connected).
Live demo
Want to see the widget in action before installing it? Visit the live demo → to experience the full booking flow and AI chat widget on a simulated med spa website.
Troubleshooting
The booking button isn't appearing
- Confirm the script tag is present in your page source (View Source in your browser, search for
bookingai). - Ensure the script has the
deferattribute — without it, the widget may not load correctly on some platforms. - Check your browser's developer console (F12 → Console tab) for any JavaScript errors referencing Servegalo.
- Confirm your
data-business-idmatches exactly what's shown in your dashboard — it is case-sensitive.
The widget shows no services
- At least one active service must be configured in the dashboard. Go to Services and check that services have Active status.
- Each service must have at least one staff member assigned to it with availability set.
Stripe payment step is missing
- Stripe deposits only appear if you have connected a Stripe account in Settings → Payments AND the service has a deposit amount greater than $0 configured.
- In test mode, deposits appear but no real charge is made. See the Stripe setup guide →
Confirmation SMS isn't sending
- Check that Twilio is connected in Settings → Integrations with a valid Account SID, Auth Token, and outbound phone number.
- Verify the Twilio number you're using is SMS-capable (not just voice).
- In Twilio's free trial, outbound SMS can only be sent to verified numbers. See the Twilio setup guide →
Still stuck? Contact our support team — we typically respond within 2 business hours.