Add live chat with Google Tag Manager
If you cannot edit your site’s code, you can add the MuhatapChat widget from your Google Tag Manager container.
In the container you create a tag that fires on all pages and add the MuhatapChat code. When you publish, the widget loads on your site. Because of the security policy, Custom HTML tags may not run; in that case add the code to the site directly.
Setup steps
- 1New tag › Tag configuration › Custom HTML.
- 2Paste the code.
- 3Choose "All Pages" as the trigger and save.
- 4Submit › Publish the change.
Menu names can differ by platform version and theme; the goal is to load the code before the </body> tag on every page.
Code to add
HTML
<script src="https://chat.muhatapchat.com/widget.js" data-widget-id="mc_XXXXXXXXXXXX" async></script>Your code is ready in the panel, in your site’s Integration tab. Replace the ID in the example below with your own.
After setup
- Open your site in preview mode and confirm the tag fires.
- Publish the container, open the site in a new tab and look for the chat bubble.
- Send a test message from the bubble; it should appear in your inbox.
Frequently asked questions
When the code loads through Tag Manager it is not in the page source. Open the site, click the bubble once and check the signal result in the panel.
The site’s content security policy (CSP) may block inline scripts. Template tags work, or add the code to the page directly.
Yes. Restrict the tag trigger by page URL.
Put live chat on your site today
Your free account opens with your site name filled in. No card needed. Want help with setup? Write to us