Ask AIWebsite widget embed

Website widget embed

Embed the Ask AI website widget on your marketing site by configuring it in AI Studio, copying the embed code, and adding it to your pages.

Embed the Ask AI website widget

Add the Ask AI widget to your marketing site so visitors can ask questions directly from any page.

Make sure you have access to AI Studio, an Ask AI experience set up, and permission to configure website embeds for your workspace.

Configure and embed the widget

Use this workflow to get the widget live on your site.

Open the Website widget embed page

Open AI Studio and go to Ask AI. From there, open the page or section where you manage the website widget embed for your Ask AI experience.

You should see options that let you review or adjust basic appearance and behavior for the widget before you copy the code.

Review basic widget settings

Adjust high-level settings such as where the widget appears on the page, any visible title or prompt text, and which Ask AI experience it connects to.

Save your changes so the generated embed code reflects your current configuration.

Copy the generated embed code

Use the copy control in AI Studio to copy the full embed snippet for your website widget.

The snippet below is only an example. Always copy the real embed code from your AI Studio workspace to ensure it includes your correct project and environment details.

<!-- Example Ask AI website widget embed -->
<script
  src="https://cdn.acme-ai.com/widget.js"
  data-project-id="proj_a1b2c3d4"
  data-widget="ask-ai"
  async
></script>

Your copied code should look similar: a script tag that loads the widget from your provider, plus attributes that link it to your Ask AI configuration.

Paste the code into your website

Open your website builder or codebase and add the embed snippet to the pages where you want the widget to appear.

For most marketing sites, place the code near the end of the <body> in your shared layout or template so the widget loads on every page.

Publish and verify the widget

Publish or deploy your changes.

Then open your live site in a new browser window or private tab. You should see the Ask AI widget appear and be able to start a conversation without errors.

Troubleshooting

If the widget does not appear or does not behave as expected, check the following:

  • Confirm you copied the latest embed code from AI Studio after saving any widget setting changes.
  • Make sure your site does not block third-party scripts through a Content Security Policy or script blocker.
  • Check the browser console for JavaScript errors related to the widget script.
  • Verify you added the code to the live layout or template, not only to a draft or preview page.
  • Ensure your marketing site is served over https, if required by your widget host.
  • Try a hard refresh or an incognito window to rule out caching issues.

What’s next