InBe Docs

Squarespace

A complete guide to integrate the InBe widget within your Squarespace website.

This guide will help you add the InBe widget to your Squarespace website using code injection.

Add the widget container

  1. Go to your Squarespace site editor
  2. Navigate to the page where you want to add the widget
  3. Add a Code Block element to your page
  4. In the code block, add the container element:
  5. Usually the id is inbe-widget, but if you have changed it, use the id you have chosen.
Add the widget container
<div id="inbe-widget"></div>

Add the widget scripts

  1. In your Squarespace admin panel, go to SettingsAdvancedCode Injection
  2. In the Footer section, paste both script tags (one for the widget library, and one for the initialization)
  3. If you changed the id of the container element, remember to update the container id in the second script tag.

If you are using the Widget Builder, and pasting the generated code into your site, make sure to remove <div id="inbe-widget"></div>.

Add the widget scripts
<script src="https://api.inbe.us/v1/widget/simple-widget.js?apiKey=YOUR_PUBLIC_API_KEY"></script>
<script>
  new InBeWidget({
    container: document.getElementById("inbe-widget"),
    apiKey: "YOUR_PUBLIC_API_KEY",
    headline: "Let's find some unforgettable restaurants",
    secondary:
      "Add your preferences and needs, and we'll find the perfect places for you",
    smartHeadline: true,
    primaryColor: "#1A0C29",
    secondaryColor: "#FF164E",
    backgroundColor: "#FFFFFF",
    maxHeight: "stretch",
    minHeight: "150px",
    maxWidth: "stretch",
    minWidth: "300px",
    height: "100%",
    width: "100%",
    templateType: ["location", "search", "preferences"],
  });
</script>
  1. Click Save

Publish your site

  1. Click Save in the site editor
  2. Publish your site
  3. Visit the page to see your widget

Important Notes

Make sure to replace YOUR_PUBLIC_API_KEY with your actual API key. The widget will appear in the code block you added to your page. If you don't see the widget, check that your API key is correct and try refreshing the page

Troubleshooting

If the widget doesn't appear: 1. Ensure the container element exists on the page, 2. Check that your API key is correct, 3. Try clearing your browser cache, 4. Make sure both script tags are in the Footer section of Code Injection.

On this page