Tag manager

Add chatbot embed code with Google Tag Manager

Deploy the widget through a Google Tag Manager Custom HTML tag when GTM is already installed on the website.

Tag manager

Before you start

Best for

Teams that already manage website scripts through GTM and want one publish workflow for all site tags.

Install location

Use a Custom HTML tag with an All Pages trigger. Publish the GTM container after testing in preview mode.

Google Tag Manager snippet
<script
  src="https://your-domain.com/widget.js"
  data-workspace-id="WORKSPACE_ID"
  data-chatbot-id="CHATBOT_ID"
  defer
></script>

Install

Install steps

  1. 1Confirm GTM is installedThe website must already load the Google Tag Manager container on every page where the chatbot should appear.
  2. 2Create a Custom HTML tagOpen Tags, create a new tag, choose Custom HTML, and paste the complete widget snippet.
  3. 3Add an All Pages triggerUse All Pages unless your team intentionally limits the chatbot to a subset of pages.
  4. 4Preview and publishUse GTM preview mode, confirm the tag fires, then submit and publish the container version.

Access

Domains

Allow the website domain where the GTM container runs.
Do not allow googletagmanager.com; it is not the visitor page domain.
Add staging domains if GTM preview tests happen on staging.

Verify

Verify

Paste the full script as provided. JavaScript inside Custom HTML still needs script tags.
Consent settings can prevent the tag from firing. Align the trigger with your support chat consent policy.
If the tag fires but no launcher appears, inspect whether another tag manager rule blocks external scripts.
Next doc

Add chatbot embed code to BigCommerce

Use BigCommerce Script Manager or the storefront theme to load the widget across the store.

Open