company logo

Support Center

Gå til Bookli Admin
Gå til Bookli Admin
All collectionsEmbeds & IntegrationsEmbedsIntegrate your activities on your website

Integrate your activities on your website

Display your activities directly on your own website

With an “embed”, you can display your upcoming activities on your own website.
Your customers can see what you offer and proceed to registration with a single click.

To use this feature, you need access to the website’s code / CMS system.
If someone else manages your website, send them this article.


Code

JavaScript
<iframe id="bookli-embed" src="https://bookli.app/embeds/workshop-calendar?locationIds=XXXXXXXXXXX&variant=0&locale=da-DK&hidePrice=0&hideBookingsCount=0&hideWaitlistCount=0" style="width: 100%; display: block; border: none;"></iframe>

<script>
    (function () {
        var bookliEmbedFrame = document.getElementById('bookli-embed')

        if (!bookliEmbedFrame) {
            return
        }

        function onMessage(event) {
            var data = event && event.data

            if (data && data.type === 'bookli-embed-resize' && typeof data.height === 'number') {
                bookliEmbedFrame.style.height = data.height + 'px'
            }
        }

        window.addEventListener('message', onMessage, false)
    })()
</script>

Please note when using the code:

  1. Replace XXXXXXXXX with your location ID.
    You can find your location ID with Bookli’s link builder — see the section below.

  2. Include the script
    This ensures that the calendar automatically adjusts its height to fit its content. Without it, the calendar will have a fixed height and its own scrollbar.

  3. Minimum container width
    It works best if the container into which the embed is inserted has a minimum width of 1540 pixels on desktop.

Getting your location ID

  1. Go to the Link builder in Bookli

  2. Select “location front page” and copy the ID after “location/”


Configuration options

Color theme

variant= controls the calendar’s color. Replace the number with the theme that suits your website:

Number

Color

0

Black

1

Brown

2

Green

3

Blue

Missing a color that better matches your design? Write to us — we can create more themes.

Multiple locations

If you have multiple locations, you can display them together in one calendar.
Write the location IDs one after another, separated by commas — with no spaces:

JavaScript
locationIds=XXXXXXXXXXX,YYYYYYYYYYY

Hide price, number of registrations and/or waiting list

By default, the calendar shows the price, the number of registrations and the number of people on the waiting list.
To hide any of these, change 0 to 1 in the code.

Hides

Code

Price

hidePrice=1

Number of registrations

hideBookingsCount=1

Number on waiting list

hideWaitlistCount=1

Show selected activity types only

If you only want to show one or more specific activity types, you can limit what the calendar displays.

Add &activityTypeIds= to the code with the IDs of the activity types you want to show.
To show more than one, separate them with commas:

JavaScript
&activityTypeIds=YYYYYYYYYYY,ZZZZZZZZZZZZZ

How do I find an activity type’s ID?

  1. Go to Activities → Activity types in Bookli Admin

  2. Open the activity type

  3. Find the ID and click the copy button

The Activities screen shows the Testing Activity overview with default details and settings; an orange arrow points to the activity ID value. Visible: Activities, Activity types, Testing Activity, Overview, Settings, Upcoming.

Language

The calendar can be displayed in four languages. Replace the code in locale= with the one you want to use:

Language

Code

Danish

da-DK

English

en-GB

German

de-DE

Finnish

fi-FI


Try out the code


Try out the code before it goes on the website

If you’d like to see what the calendar looks like with your color and language, you can test the code at codepen.io/pen.

Insert the entire code in the HTML field, and the calendar will appear immediately.


Did this answer your question?
😞
😐
😁