Developers

Website embed

Put Mosh on your own website. One script tag turns any link to your booking page into a popup. Guests pick a night and pay the deposit without leaving your site, and payments never touch your page.

embed.js is a small script you add to your site once. It finds links to your Mosh booking page and opens them in a modal iframe instead of navigating away. The booking flow inside is the same one Mosh hosts; your page just frames it.

<script async src="https://mosh.events/embed.js"></script>

Requirements

  • Your venue's slug, the part after mosh.events/v/ in your booking link. Settings › Website shows it and prefills every snippet.
  • Somewhere to paste one line of HTML: your site builder's code injection, a footer, or a Code Block. Platform guides →
  • At least one bookable package, or the popup opens on an empty calendar. Take private bookings →

No account keys, no build step, no npm package. The script works on any site that lets you add HTML.

How it works

  1. The script loads asynchronously and scans the page for links whose href points at mosh.events/v/‹slug›/book.
  2. Clicking one opens a modal with an iframe of your booking page. Deep links such as a preselected package pass straight through.
  3. Checkout happens inside the iframe on mosh.events. Card details never reach your page. Security →
  4. When the booking completes, the script fires a mosh:complete event and the modal shows the confirmation. Script reference →

If the script fails to load or JavaScript is off, the link still works as a normal link to the hosted booking page.

In your dashboard, open Settings › Website. Your link looks like this:

https://mosh.events/v/your-venue/book

Use it as any button's URL, in your Instagram bio, or as the Reserve link on your Google Business Profile. It works with no code at all.

Step 2: Paste the script once

Into your site's code injection or footer (see Platform guides for the exact spot):

<script async src="https://mosh.events/embed.js"></script>

It loads nothing until someone clicks.

Done. Every button, link or menu item pointing at your booking link now opens the booking window on your page instead of leaving it. Links added later (single-page apps, Wix) are picked up too.

Ready-made button

Don't want to style a button? Paste this into a Code Block or HTML embed and you get a styled button that opens the popup, script and button in one paste:

<script async src="https://mosh.events/embed.js"></script>
<a class="mosh-button" href="https://mosh.events/v/your-venue/book">Book a private event</a>

Add mosh-button--light to the class for the outlined version. .mosh-button only styles elements that carry the class; it never touches your own buttons.

Floating button

Can't edit your buttons at all? Add data-mosh-fab to the script tag and a "Book" button floats in the corner of every page:

<script async src="https://mosh.events/embed.js"
  data-mosh-fab="your-venue"
  data-mosh-fab-label="Book a private event"></script>

Testing it

Click your button. The popup should open with your packages. If it navigates to mosh.events instead, the script isn't loading on that page; check the placement in Platform guides. Either way, the guest can still book.

Tip

The live example on the venue-facing page opens the popup for the demo venue. Nothing is charged.