Website

Every Loopit workspace comes with an instant out of the box website that allows you to quickly start marketing your assets and take bookings. This website can be accessed directly or embedded on your existing website.

Customising branding

You are able to change the primary colour, border radius and background image on the homepage of your website. To do this navigate to Settings > Website.

The primary color is used for all buttons and call to actions. For example

Setting
Usage

Primary color

Buttons color, call to actions

Border corner radius

Buttons

Cover image

Image on homepage behind search bar

Header background color

Background color of the header

Header text color

Text color for the header

Customising content

You are able to customise the marketing consent copy and the terms consent copy. This will override the defaults which we apply during customer facing sign up flows .

You also have the ability to define a callout for the header which will appear on the right side. Examples of this would be your phone number or email address to show throughout the website.

Customising Logo Redirect Behaviour

By default, clicking the Loopit logo redirects the user back to the Loopit homepage. However, this behaviour can be customised to navigate the user to a specific page of your choice.

This is particularly useful if your integration only embeds the signup form component and you do not wish to leverage other areas of the Loopit website. By defining a custom redirect path, you can ensure users remain within your intended experience after interacting with the logo.

To set the URL;

1

2

Click on Website

3

Click on Website Customisation

Enter a full URL in the field labelled "Logo redirect URL (optional)"

Embedding on existing website

To embed the site on an existing website you have please go to Settings > Website and copy the code snippet in the "Embed on existing website" card

Dynamic height adjustment and scroll position sync for embed

This script dynamically adjusts the height of an iframe on your webpage when embedded, and also tracks the current scroll position within the iframe. The script should be placed before the iframe embed code on your website. Please reach out to [email protected] and we can assist.

<script>
// Update this variable with your website URL
const allowedOrigin = "https://website.myloopit.com";
// Define the ID of the iframe that you want to resize dynamically
const iframeId = "myIframe";
// Use to get iframe height
var iframeHeight = 0;
// Use to send current position of iframe
let debounceTimeout;

window.addEventListener('message', (event) => {
  if (event.origin === allowedOrigin) {
    if (event.data.type === 'PAGE_HEIGHT_CHANGE') {
      let newHeight = event.data.height;
      
      const iframe = document.getElementById(iframeId);
      
      if (iframe) {
        iframeHeight = newHeight;
        iframe.style.height = `${iframeHeight}px`;
      } else {
        console.warn(`Iframe with ID '${iframeId}' not found. Please ensure the correct ID is set.`);
      }
    }
  } else {
    console.warn("Received message from unexpected origin:", event.origin);
  }
});

window.addEventListener("scroll", () => {
  const iframe = document.getElementById(iframeId);

  if (iframe) {
    const rect = iframe.getBoundingClientRect();
    const visibleTop = window.scrollY + rect.top;
    const currentPosition = window.scrollY - visibleTop;
    const maximumAllowedHeight = iframeHeight * 0.8; // 80%

    clearTimeout(debounceTimeout);

    // Send the current scroll position to the iframe when scrolling stops
    debounceTimeout = setTimeout(() => {
      // Send the current scroll position to the iframe only while scrolling within it, not before or after
      if (rect.top <= 0 && currentPosition <= maximumAllowedHeight) {
        iframe.contentWindow.postMessage({ type: 'scrollPosition', currentPosition }, '*');
      }
    }, 200);
  }
});
</script>

Last updated