# Add PiGi booking to any website

The website embed puts PiGi on any website, whatever it is built with (hand-written HTML, PHP, Squarespace, Webflow, Wix and others). Paste one script tag, then add a block where you want each part: booking wizard, Book now buttons, gift vouchers, activities, courses, one course, upcoming course dates or your team. Integrations → Website embed builds the code for you with a live preview. For WordPress or Shopify, use their own integration instead.

Source: https://help.pigi.io/guides/integrations/website/website-embed

## Quick answers

**Can I put PiGi booking on a website that isn't WordPress or Shopify?**
Yes. Open **Integrations → Website embed**, pick a block, and copy the two pieces of code it
gives you into your website. It works on any site you can add HTML to.

**What code do I paste?**
Two pieces. The script goes on every page once, just before `</body>` (or in your site
builder's footer or "custom code" setting):

```html
<script src="https://pigi.io/widgets/v1/embed.js" data-tenant="YOUR-SCHOOL-REFERENCE" async></script>
```

Then a block wherever you want something to appear:

```html
<div data-pigi-block="booking"></div>
```

The drawer fills in your school's reference for you.

**My website builder only lets me add links. What can I do?**
Use your booking page instead. The drawer shows its address under **No code? Share your
booking page**. Link your site's Book now button to it.

**The activities, courses or team block says "couldn't load from PiGi".**
Your website isn't on PiGi's list yet. The website saved in **Company settings** is always
allowed; add any other address (a second domain, a staging copy of your site) under
**Websites that show your catalogue** in the drawer, press Enter, then **Save settings**. The
booking wizard, gift vouchers and buttons don't need this.

**How do I change how it looks?**
In **Integrations → Website embed → Appearance**: accent colour; colours (light, dark, the
visitor's device, or **My own colours**: background, cards and text, for a site that is black,
cream or anything else); button colour, text, corners, size and shadow; card corners and font;
the booking wizard's steps (in a card, without one, or hidden; their width, text size and
lettering), whether each step sits in a card, and the space between the activities; the space around and inside the booking dialog; plus the floating Book now button and the chat
assistant. Click **Save settings**. It's saved in PiGi, so every page of
your website shows the change on its next load, with no code to update. The preview in the
drawer shows your changes before you save.

**Does it change my WordPress or Shopify booking wizard too?**
Yes. The booking wizard, gift vouchers, checkout and payment result take the colours, accent
and square corners from Appearance wherever they appear: this embed, the WordPress plugin and the Shopify app. Until
you save Appearance once, a WordPress site keeps the colour set in its plugin. After that, the
plugin's own wizard colour and colour scheme still win where you changed them in the plugin
(plugin 1.13.0 or later); everything else comes from Appearance.

**The booking wizard flashes light while it loads on my dark site.**
It shouldn't any more: while it loads, the wizard is see-through, so your own page shows behind it.
If you still see a light box, check **Colours** is set to Dark or My own colours.

**Why doesn't my site show the new look?**
Your website has to be allowed (see above): the look arrives with your school's details, which
the browser only reads for allowed websites. A site that isn't allowed still gets the booking
wizard and buttons, in the colours written in its code (or PiGi's orange). Visitors may also
see the old look for up to a minute.

**Can one page look different?**
Yes. Options on the script tag (`data-theme`, `data-label`, `data-button-radius`…) win over
Appearance on that page, and options on a block win over both, for that block.

**Will it clash with my website's design?**
No. Each block is kept separate from your site's styles, so your CSS can't break it and it
can't change your pages. It takes your site's font (unless you pick the clean sans-serif) and
text colour, and the colours from Appearance.

**Can I style the blocks with my own CSS?**
Yes. Add `data-shadow="0"` to the script tag and the blocks draw straight into your page,
where every part has a `pigi-…` class for your CSS.

**Does payment work on my site?**
Yes. The customer leaves your site only for the payment page, then comes back to the same
page, where the booking opens on the result.

**Is there a floating Book now button or the chatbot?**
Yes. Switch them on under **Appearance** in the drawer (or add `data-button="floating"` and
`data-chat="1"` to the script tag). The chatbot only appears when it is switched on in PiGi; when it is, it takes the
floating button's place, because it books too.

## Blocks

Every block is a `<div data-pigi-block="…">` with its options as `data-` attributes.

| Block | What it shows | Options |
|---|---|---|
| `booking` | The booking wizard, in the page. It grows to fit. | `data-activity` (open on one listing), `data-height`, `data-max-width`, `data-scheme`, `data-theme` |
| `button` | A Book now button that opens the wizard in a dialog. | `data-activity` or `data-course`, `data-label`, `data-align`, `data-button-color`, `data-button-radius`, `data-button-font-size`, `data-button-width`, `data-button-shadow="0"` |
| `gift-vouchers` | The gift voucher wizard. | `data-activities` (comma-separated references), `data-height`, `data-scheme`, `data-theme` |
| `activities` | Everything bookable, as cards with Book now. | `data-types` (activity, course, tour, item), `data-columns`, `data-book="0"`, `data-book-label`, `data-currency` |
| `courses` | Your courses, as cards. | `data-columns`, `data-currency` |
| `course` | One course in full. | `data-ref` (the course's reference), `data-sections` (gallery, meta, book, overview, outcomes, dates, requirements, faqs), `data-book-label`, `data-currency` |
| `upcoming-courses` | Every scheduled course date, by month. | `data-months`, `data-limit`, `data-courses`, `data-headings="0"`, `data-book="0"`, `data-book-label`, `data-currency` |
| `team` | Your team, in the sections you arranged in PiGi. | `data-sections` (e.g. `tfi,crew`), `data-columns`, `data-limit`, `data-shape` (circle, rounded, square), `data-roles="0"`, `data-headings="0"` |

Prices show in your school's currency. `data-currency="R"` replaces the symbol with your own
prefix.

### On the script tag

| Option | What it does |
|---|---|
| `data-tenant` | Your school's reference. Required. |
| `data-theme` | Accent colour for the wizard and buttons. |
| `data-scheme` | Wizard colours: `light` (default), `dark` or `auto` (follows the visitor's device). |
| `data-button-color`, `data-button-radius`, `data-button-font-size`, `data-button-shadow="0"`, `data-label` | Every button on the page. |
| `data-card-radius`, `data-font="sans"` | Picture corners and font of every block. |
| `data-lang` | Language: `af`, `de`, `es`, `fr` or `nl`. Without it, the page's own language is used. |
| `data-button="floating"` | A floating Book now button (`none` keeps it off). |
| `data-chat="1"` | The chat assistant (`0` keeps it off). |
| `data-shadow="0"` | Draw blocks in the page, for your own CSS. |

Every one of these is also under **Appearance**; the script tag only needs one when a page
should differ.

## For developers

Blocks added after the page loads (single-page apps, page builders) are picked up by
themselves. `window.PiGiEmbed.book(activityRef)` opens the booking dialog from your own code,
and a completed booking fires a `pigiBookingComplete` event on the document with the booking
reference, amount and currency.
