Skip to content

Embed Widget

Putting Your Assistant on Your Website Go Live

Section titled “Putting Your Assistant on Your Website ”

The Embed page gives you the code to add your assistant to your website. Once installed, your assistant appears as a friendly chat bubble that visitors can click to start a conversation – just like having a helpful team member available 24/7.

Embed code and preview

Copy the code snippet provided and paste it into your website. The code is unique to your assistant and includes all the styling you’ve set up in Appearance.

  1. Copy the code from the Embed page in your dashboard

  2. Open your HTML file in a code editor

  3. Paste before </body>

    <!-- Your Assistant Chat Widget -->
    <script
    src="https://app.mygptassistants.com/widget.js"
    data-bot-id="YOUR_BOT_ID"
    async
    ></script>
    </body>
  4. Save and upload your website

Listen for what’s happening with the chat widget:

// Know when customers interact with your assistant
window.MGAWidget.on('open', () => {
console.log('Chat opened');
});
window.MGAWidget.on('close', () => {
console.log('Chat closed');
});
window.MGAWidget.on('message', (data) => {
console.log('New message:', data);
});

Position

Choose which corner of the screen your assistant appears in.

Chat Icon

Customize the chat bubble that visitors click to start chatting.

Colors

Match the widget to your brand colors.

  1. Add the code to your website using one of the methods above

  2. Visit your website and look for the chat bubble

  3. Click to open and have a test conversation

  4. Check on mobile – make sure it works on phones and tablets too