Google Tag Manager chatbot embed
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.
Install
Install steps
- 1Confirm GTM is installedThe website must already load the Google Tag Manager container on every page where the chatbot should appear.
- 2Create a Custom HTML tagOpen Tags, create a new tag, choose Custom HTML, and paste the complete widget snippet.
- 3Add an All Pages triggerUse All Pages unless your team intentionally limits the chatbot to a subset of pages.
- 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.
Troubleshoot
Google Tag Manager troubleshooting
If the launcher does not appear, confirm the chatbot is published, the plan and credits are active, and the exact live hostname is allowed.
If the widget loads in preview but not production, check whether the builder preview URL and the live custom domain are different hostnames.
If the page has a content security policy, allow the OrhanAI app URL and widget requests before retesting.
If the launcher appears twice, remove duplicate snippets from theme files, site settings, and tag managers.
If mobile layout feels crowded, adjust widget position and test the most important conversion pages first.
If these checks pass and the widget still does not load, compare the installed snippet with the current Embed page and review widget setup.
