Skip to content
localbot Docs
Installation

HTML Installation

Add localbot to any website where you can edit the HTML source.

Add localbot to any website where you can edit the HTML source. This is the universal installation method.

Time: Under 2 minutes

Steps

Get your embed code

Log in to your localbot dashboard and copy the embed code. It looks like this:

<script src="https://localbot.io/api/widget/YOUR_WIDGET_ID" async></script>

Paste before the closing body tag

Open your website's HTML file in a text editor. Find the </body> tag (usually near the end of the file) and paste the embed code directly above it:

<!-- Your page content above -->

<script src="https://localbot.io/api/widget/YOUR_WIDGET_ID" async></script>
</body>
</html>

Save and upload

Save the file and upload it to your server. If you're using a CMS or hosting panel, click Save/Publish.

Targeting a specific location

By default, localbot appends the form to the end of your page. To place it in a specific location, add an empty div with the ID localbot-contact:

<div id="localbot-contact"></div>

The widget will render inside this div instead of appending to the body.

Verify

Open your website in a browser. You should see the localbot form. Fill it out and check your phone. You should receive an SMS within 5 seconds.

Content Security Policy

If your site (or your CDN / reverse proxy) sends a Content-Security-Policy header, the browser will block the widget unless localbot.io is explicitly allowed. Add it to both script-src and connect-src:

Content-Security-Policy:
  script-src 'self' https://www.localbot.io;
  connect-src 'self' https://www.localbot.io;

If you are not sure whether you have a CSP, open your site, press F12, and look at Network → any page request → Response Headers. If you see content-security-policy, check that localbot.io appears in the script-src and connect-src directives.

Troubleshooting

  • Widget doesn't appear: Check that the script tag is before </body>, not inside <head>. Verify your widget ID is correct in the dashboard.
  • Widget script blocked or missing in Network tab: Most likely a CSP issue. See the "Content Security Policy" section above.
  • Form appears but no SMS: Make sure you've added your phone number in the dashboard setup.
  • Widget appears twice: Make sure you only have one script tag. The widget prevents double-loading, but check for duplicate inclusions.

Last updated: 2026-05-23. Maintained by Benjam Indrenius.

On this page

Cookie preferences

Essential cookies plus optional analytics. No ad cookies.