Getting Your Embed Code

Last updated: November 29, 2025

Getting Your Embed Code

Add SimpleChat to your website with a simple code snippet. This guide shows you how to get and install the embed code.

Getting the CodeFrom Bot Studio
  1. Open Bot Studio for your bot
  2. Click Get Code in the top bar
  3. Modal appears with your embed code
  4. Click Copy to copy to clipboard
Code Format

Your embed code looks like this:

<script src="https://bot_xxx.w.simplechat.bot/widget.js"></script>

Replace bot_xxx with your actual bot ID.

Installing on Your WebsiteBasic Installation

Add the code before the closing </body> tag:

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

  <!-- SimpleChat Widget -->
  <script src="https://bot_xxx.w.simplechat.bot/widget.js"></script>
</body>
</html>
WordPress
  1. Go to Appearance > Theme Editor
  2. Open footer.php
  3. Paste code before </body>
  4. Save changes

Or use a plugin like "Insert Headers and Footers":

  1. Install the plugin
  2. Go to Settings > Insert Headers and Footers
  3. Paste in "Scripts in Footer"
  4. Save
Shopify
  1. Go to Online Store > Themes
  2. Click Actions > Edit Code
  3. Open theme.liquid
  4. Paste before </body>
  5. Save
Wix
  1. Go to Settings > Custom Code
  2. Click Add Code
  3. Paste your embed code
  4. Place: Body - End
  5. Apply to: All Pages
  6. Save
Squarespace
  1. Go to Settings > Advanced > Code Injection
  2. Paste in "Footer" section
  3. Save
React/Next.js

Add to your main layout or _app.js:

import Script from 'next/script'

export default function App({ Component, pageProps }) {
  return (
    <>
      <Component {...pageProps} />
      <Script
        src="https://bot_xxx.w.simplechat.bot/widget.js"
        strategy="lazyOnload"
      />
    </>
  )
}
Vue.js

Add to your main App.vue or index.html:

<script src="https://bot_xxx.w.simplechat.bot/widget.js"></script>
Verifying Installation

After adding the code:

  1. Visit your website
  2. Look for the chat button (bottom right)
  3. Click to open the widget
  4. Send a test message
Troubleshooting

Widget not appearing:

  • Check code is before </body>
  • Clear browser cache
  • Check for JavaScript errors (F12 > Console)
  • Verify bot is active (not paused/deleted)

Widget appears but doesn't work:

  • Check internet connection
  • Verify Telegram group is set up
  • Check bot subscription status
Multiple Pages

The widget appears on every page where the code is installed:

  • For all pages: Add to main layout/template
  • For specific pages: Add only to those pages
  • To exclude pages: Use conditional logic
Advanced OptionsDelayed Loading

Load widget after page is ready:

<script>
  window.addEventListener('load', function() {
    var script = document.createElement('script');
    script.src = 'https://bot_xxx.w.simplechat.bot/widget.js';
    document.body.appendChild(script);
  });
</script>
Conditional Display

Show widget only for certain users:

<script>
  if (userIsLoggedIn) {
    var script = document.createElement('script');
    script.src = 'https://bot_xxx.w.simplechat.bot/widget.js';
    document.body.appendChild(script);
  }
</script>
Security Considerations
  • Code is safe to use on any website
  • No sensitive data in the script URL
  • Widget loads over HTTPS
  • Cross-origin security handled
Need Help?

If you're having trouble installing:

  1. Check our troubleshooting guide
  2. Contact support with your website URL
Next Steps