--- title: "Publish Web Messenger via Google Tag Manager" slug: "mindbehind-publish-web-messenger-via-google-tag-manager" description: "Learn how to publish MindBehind Web Messenger on your website using Google Tag Manager with step-by-step setup and configuration guidance." tags: ["publish web messenger", "google tag manager", "web messenger"] updated: 2026-11-25T11:10:52Z published: 2026-11-25T11:10:52Z canonical: "academy.insiderone.com/mindbehind-publish-web-messenger-via-google-tag-manager" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Publish Web Messenger via Google Tag Manager Use Google Tag Manager (GTM) to add MindBehind Web Messenger to your website. First, copy the script from your Web Messenger channel. Then, add it to a Custom HTML tag in GTM. - [Before you begin](/docs/mindbehind-publish-web-messenger-via-google-tag-manager#before-you-begin) - [Copy the Web Messenger script](/docs/mindbehind-publish-web-messenger-via-google-tag-manager#copy-the-web-messenger-script) - [Add the script to Google Tag Manager](/docs/mindbehind-publish-web-messenger-via-google-tag-manager#add-the-script-to-google-tag-manager) - [Test and publish](/docs/mindbehind-publish-web-messenger-via-google-tag-manager#test-and-publish) ## Before you begin - Make sure you have a Web Messenger channel connected to your assistant. - Make sure your GTM container is installed on your website. If you have not set up GTM yet, create an account and a web container, then follow the installation instructions provided by GTM. > [!NOTE] > For setup instructions, refer to [Integrate Web Messenger](/v1/docs/mindbehind-integrate-web-messenger) or [Integrate Web Messenger V2](/v1/docs/mindbehind-integrate-web-messenger-v2). ## Copy the Web Messenger script 1. In MindBehind Flow, navigate to **Companies** and select the company that owns your assistant. ![](https://cdn.document360.io/c6df4583-da94-4cb2-bb8a-be0cbdd11109/Images/Documentation/image-GPC5IT2Q.png) 2. Open the **Channels** tab. 3. Find the Web Messenger channel you want to publish and click **Update**. ![](https://cdn.document360.io/c6df4583-da94-4cb2-bb8a-be0cbdd11109/Images/Documentation/image-CYZFINGC.png) 4. Open the **Getting Started** tab. 5. Select and copy the Web Messenger script displayed in this tab. You will paste this script into GTM in the next section. ![](https://cdn.document360.io/c6df4583-da94-4cb2-bb8a-be0cbdd11109/Images/Documentation/image-SQ1XBGSV.png) > [!NOTE] > Use the script copied from your own Web Messenger channel, not a sample script. ## Add the script to Google Tag Manager > [!NOTE] > If the Web Messenger script is already added directly to your website code, do not add it again through GTM. Adding the script in both places loads the widget twice. 1. Open the GTM container installed on your website. 2. Navigate to **Tags** and click **New**. ![](https://cdn.document360.io/c6df4583-da94-4cb2-bb8a-be0cbdd11109/Images/Documentation/image-LGWWJ3TI.png) 3. Enter a descriptive name for the tag, such as **MindBehind Web Messenger**. 4. Open **Tag Configuration** and select **Custom HTML**. 5. Paste the complete script you copied from the **Getting Started** tab into the **HTML** field, including the opening and closing `<script>` tags. ![](https://cdn.document360.io/c6df4583-da94-4cb2-bb8a-be0cbdd11109/Images/Documentation/image-EO3NT7TV.png) 6. Open **Triggering** and select **All Pages** to display Web Messenger across your website. To display it only on selected pages, use a **Page View** trigger with conditions that match those pages. ![](https://cdn.document360.io/c6df4583-da94-4cb2-bb8a-be0cbdd11109/Images/Documentation/image-JLDR4T5J.png) 7. Click **Save**. ## Test and publish 1. Click **Preview** in GTM and connect to your website. 2. Open a page where the tag should fire. 3. Confirm that the Web Messenger tag fires and that the widget appears on the page. 4. Open the widget and send a test message to check that your assistant responds. 5. If you configured the tag for selected pages only, also check a page that should not display the widget. 6. After testing, return to GTM and click **Submit**. 7. Enter a version name and description, then click **Publish**. ## Related - [Integrate Web Messenger](/mindbehind-integrate-web-messenger.md) - [Integrate Web Messenger V2](/mindbehind-integrate-web-messenger-v2.md)