Leader24Leader24
🇬🇧

Embed Code

How to get and install the widget embed code

The embed code is the JavaScript snippet that adds the widget to your site.

Getting the Code

  1. Go to Widget in the dashboard sidebar
  2. On the agent's card click Integration Code
  3. In the Integration Code card click Copy Code

Standard Code

The code to copy and paste:

html
<script>
  window.Leader24WidgetConfig = {
    agentId: 'YOUR_AGENT_ID',
    apiUrl: 'https://api.leader24.ai'
  };
</script>
<script src="https://api.leader24.ai/widget-public/YOUR_AGENT_ID/widget.js" async></script>

Where to Place It

Paste the code before the closing body tag:

html
<!DOCTYPE html>
<html>
<head>
  <title>Your site</title>
</head>
<body>
  <!-- Your site content -->

  <!-- Leader24 Widget - insert before closing body -->
  <script>
    window.Leader24WidgetConfig = {
      agentId: 'YOUR_AGENT_ID',
      apiUrl: 'https://api.leader24.ai'
    };
  </script>
  <script src="https://api.leader24.ai/widget-public/YOUR_AGENT_ID/widget.js" async></script>
</body>
</html>

Send the instructions to your web master

If someone else manages your site, click Send install instructions to your web master in the Integration Code card: they'll receive the code and a step-by-step guide by email. You can attach a personal message (maximum 3 sends every 24 hours) and track the installation status from the card.

Customization

Configure from the Dashboard

All customization options (colors, position, messages, avatar, theme, etc.) are configured from Dashboard → Widget → Settings.

Changes apply automatically when the page reloads, without changing the code on your site.

Platform-specific instructions

WordPress

Use the official Leader24 plugin:

  1. In the WordPress panel go to Plugins → Add New Plugin and search for Leader24
  2. Click Install Now, then Activate
  3. Paste your Agent ID in the Leader24 menu entry

In the dashboard's Integration Code card you'll find the WordPress tab with the illustrated guide. Alternatively you can paste the HTML snippet with a plugin like "Insert Headers and Footers".

Shopify

  1. In the Shopify panel go to Online Store → Themes → Edit code
  2. Open theme.liquid
  3. Paste the snippet before the closing body tag
  4. Save

Wix

  1. Go to Settings > Custom Code
  2. Click + Add Code
  3. Paste the code
  4. Select "Body - end"

Squarespace

  1. Go to Settings > Advanced
  2. Click Code Injection
  3. Paste in the Footer field

Verify the Installation

After installing:

  1. Reload the page
  2. You should see the widget icon in the corner
  3. Click to open the chat
  4. Test by sending a message

Common Issues

Widget doesn't appear

  • Check that the agentId is correct
  • Check the browser console for errors
  • Make sure the widget is active in the dashboard

Widget appears but doesn't reply

  • Check that the agent is active
  • Check the widget's reply hours: outside those hours the agent doesn't reply
  • Check the network connection

Security

Important

  • The agentId in the snippet is public and visible in the source code: that's by design, it's not a secret
  • To control where the widget is allowed to work, use the Allowed domains in the settings (the check is enforced by our servers)
  • Against abuse, a limit of 60 requests per hour per visitor is active by default

Next Steps

© 2026 Leader24.