Install with Google Tag Manager
Add your botts.ai chat widget to a site that already uses Google Tag Manager, with a Custom HTML tag that fires on all pages.
This guide adds the chat widget of a botts.ai website deployment to a site that already uses Google Tag Manager. You add the widget's script as a Custom HTML tag, let it fire on all pages and publish the container. Your site's own code stays as it is.
Before you start
You need:
- A Tag Manager container that is already installed on your site. If your site doesn't use Tag Manager yet, it is simpler to add the code to the site directly: see the other guides under Add to Your Website in the sidebar.
- Publish permission for the container. With Edit or Approve you can prepare the tag, but only a user with Publish can put it live. An account administrator can change permissions under Admin → User Management.
- No paid plan. Google Tag Manager is free, and Custom HTML tags are part of the free version.
- The embed code of your website deployment. In botts.ai, open Agents, pick your agent, go to the Deploy tab and open the Website deployment. The Install section at the bottom of the editor shows the code with a copy button. No website deployment yet? See Deployments.
The embed code looks like this, with your deployment's own key in place of YOUR_API_KEY:
<script async src="https://api.botts.ai/widget/chat-widget.js?key=YOUR_API_KEY"></script>
Note
The website widget needs the Business plan or higher. The Personal plan includes the internal chat only.
Step 1: Open your container
Go to tagmanager.google.com, sign in with your Google account and open the container that is installed on your website.
Step 2: Create a new tag
In the Workspace tab, click Tags on the left, then New at the top right of the tag list.

Replace Untitled Tag at the top with a name you will recognize, for example botts.ai chat widget.
Step 3: Choose Custom HTML and paste the code
Click Tag Configuration. In the Choose tag type panel that opens, select Custom HTML under Custom, below the Google tag types.

Paste your embed code into the HTML field, exactly as copied: the address and the key must not change. Leave the other options as they are.

Step 4: Fire the tag on all pages
Click Triggering and choose All Pages (type Page View), not one of the variants with Initialization in their name. Then click Save at the top right.

The tag is now saved in your workspace, but it isn't live yet. Nothing reaches your site until you publish in step 6.
Step 5: Test in Preview mode
Click Preview at the top right. Tag Assistant opens in a new tab. Enter your site's address and click Connect. Your site opens as if the changes were already published, and the chat launcher should appear. Only you see this preview, not your visitors.
Close the preview window and go back to Tag Manager.
Step 6: Publish the container
Click Submit at the top right. Leave Publish and Create Version selected, give the version a name such as botts.ai chat widget, and click Publish. The widget is now on your live site.
Step 7: Check the widget on your site
Open your public site in a private window, reload the page and wait a moment. The chat launcher appears in the bottom-right corner, or wherever you placed it in the widget editor. Open it and send a test question. Check a subpage and your phone as well.
Tip
It worked if the widget shows on your public site, opens, and answers your test question.
If the widget doesn't appear
- Check that you published. Save only stores the tag in your workspace; your site gets it after Submit → Publish.
- Open the tag and check that the complete code is in the HTML field, the trigger is All Pages, and the tag isn't paused.
- If your account has several containers, check that you worked in the one that is installed on this site. If Preview can't connect to your site, the container may be missing from that page.
- If your site uses consent settings in Tag Manager, open the tag's Advanced Settings → Consent Settings. With Require additional consent for tag to fire, the tag only fires if every consent type listed there is already granted when the page loads. A visitor who consents later only sees the widget after opening another page or reloading the current one.
- Test in a private window without an ad blocker. Ad blockers can stop Tag Manager, and with it the widget. If your cookie banner or consent tool blocks scripts, check its configuration.
- Check that the key belongs to the right deployment and that the deployment is switched on in the Deploy tab.
Change or remove the widget
Colors, texts, the launcher and every other widget setting are changed in the botts.ai editor. Your site picks them up without any change in Tag Manager. The code only needs replacing if the deployment's key changes: paste the new code into the tag, save and publish again.
To remove the widget, open the tag under Tags, click the three-dot icon at the top right and choose Pause, then Save. To remove it for good, delete the tag instead. Either way, the change only reaches your site after you submit and publish again.
Note
The screenshots show Google Tag Manager in English. Menu and button names can differ with your Tag Manager language.
More help
- Tag Manager Help: Custom tags
- Tag Manager Help: Verify and publish tags
- The general steps for any website: Embed code
Last updated on October 4, 2026