> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meetdarwin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Darwin with Google Tag Manager

> Deploy Darwin using a Google Tag Manager Custom HTML tag, choose its page trigger, preview, and publish.

Deploy Darwin through a **web container** using a Custom HTML tag. Your tag's trigger decides which pages load the chat.

## Before you start

* The Google Tag Manager web container is already installed on your website.
* You can edit and publish that container, and manage the Darwin workspace.
* Your team has decided which pages should show Darwin and how its consent settings apply.
* Darwin is not already installed through your website builder or another tag.

## Create and publish the tag

<Steps>
  <Step title="Get your Darwin snippet">
    Open [Settings → Installation](https://app.meetdarwin.ai/admin/settings/installation) in the workspace you want to install.

    1. Under **Allow your website**, add the exact public hostname. `www.example.com` and `example.com` are separate hosts; add each one you actually use.
    2. Select **Copy** beside your workspace's embed code. Keep the complete snippet, including `async`, `data-site-key`, and `data-api-url`.

    Use your own snippet, not another workspace's code. If you also test on a staging domain, allow that hostname separately.
  </Step>

  <Step title="Create a Custom HTML tag">
    In your web container's workspace, open **Tags → New**. Name the tag **Darwin chat**. Select **Tag Configuration → Custom HTML** and paste the complete snippet into the HTML field.

    Keep the script tags and `async` attribute. Darwin does not require **Support document.write**.
  </Step>

  <Step title="Set the trigger">
    Under **Triggering**, choose **All Pages** for a site-wide installation. Use a narrower page trigger if you only want the chat in part of your site. Keep any consent requirements your team has configured.

    Save the tag. A server-side container cannot place this browser widget on your pages.
  </Step>

  <Step title="Preview the visitor experience">
    Select **Preview**, enter the public website URL, and connect Tag Assistant. Visit a page covered by the trigger and confirm **Darwin chat** fires once. Open the launcher and check the assistant.

    If the tag did not fire, inspect its trigger and consent state in Tag Assistant.
  </Step>

  <Step title="Publish the container">
    Select **Submit → Publish and Create Version**. Add a clear version name, review the changes, then select **Publish**. Previewing or saving the workspace alone does not publish the tag.
  </Step>

  <Step title="Check the live site">
    Open the **published website** in a fresh browser session. Check the homepage and an inner page, then check a phone-sized screen.

    * The launcher appears once and opens your workspace's chat.
    * The assistant uses your saved appearance and opening message.
    * A question receives an answer from your assistant.
    * If you configured a scheduler, the booking flow opens correctly. Completing a live booking creates a real appointment and can count toward usage; use **Test chat** in Darwin for a simulated booking.

    Return to **Settings → Installation** and select **Check installation** or **Recheck installation**. If **Activate on my website** is available, finish that step too. Finding a script and activating a workspace are separate checks.

    If the widget is missing, follow [Widget not showing](/help/widget-not-showing). If only scheduling needs attention, use [Booking troubleshooting](/help/booking-troubleshooting).
  </Step>
</Steps>

<Note>
  Darwin's HTML installation check may not detect a snippet injected by a tag manager after the page loads. Confirm the published tag in Tag Assistant and check the actual public chat before treating that result as a failed installation.
</Note>

## Troubleshooting

<AccordionGroup>
  <Accordion title="The tag fires, but the chat is missing">
    Check the exact hostname in Darwin, the workspace's active status, and the copied site key. Then check browser blocking, consent, and content-security-policy restrictions. See [Widget not showing](/help/widget-not-showing).
  </Accordion>

  <Accordion title="Preview works, but the public site does not">
    Confirm you published the container version to the environment installed on the public site. Test without Tag Assistant connected so you see the same release as a visitor.
  </Accordion>

  <Accordion title="The widget appears twice">
    Check both your tag-manager container and the website's own custom-code fields. Keep one copy of Darwin. Do not add a second history-change trigger just to initialize another widget during navigation.
  </Accordion>
</AccordionGroup>

## Update or remove Darwin

Edit the chat in Darwin without changing the tag. To stop loading the widget, pause or remove **Darwin chat** in Tag Manager and publish the updated container.

[Complete the launch checklist](/installation/launch-checklist) · [Darwin + Google Tag Manager overview](https://www.meetdarwin.ai/integrations/google-tag-manager)

<Accordion title="Platform references">
  Checked on September 14, 2026: Google's [Custom HTML tag guide](https://support.google.com/tagmanager/answer/6107167?hl=en) and [verification and publication steps](https://support.google.com/tagmanager/answer/14842769?hl=en).
</Accordion>
