You can install a chat widget through Google Tag Manager by creating a Custom HTML tag, pasting the widget's script tag into it, triggering it on All Pages and publishing the container. It's the usual route for marketers who can change tags but not site code, and SpideyChat lists Tag Manager as a supported install method. The two things to decide on purpose are the trigger and the consent settings, because a Custom HTML tag fires regardless of consent unless you tell it otherwise.
Here is the setup, then the parts that need thought.
Create the tag
At the time of writing (October 2026), the steps in Tag Manager are:
- Open your container and go to Tags, then New.
- Click Tag Configuration and choose Custom HTML.
- Paste your chatbot's script tag into the HTML box exactly as you copied it, including the
data-bot-idattribute. The widget reads your bot ID from that attribute, so don't strip it out. If you need the ID, see find your bot ID. - Leave Support document.write unticked. The SpideyChat widget doesn't use document.write.
- Name the tag something you'll recognise, such as "Chat widget".
Google's help center notes that Tag Manager minifies Custom HTML and can change single quotes to double quotes. That doesn't affect a one-line script tag.
Pick the trigger
For chat on every page, choose the All Pages trigger. It's a Page View trigger, which Google's documentation says fires as soon as the browser begins to load a page. That's early, before the page body exists. The SpideyChat widget handles this: if the body isn't there yet, it waits for the page to finish loading before adding the chat button.
If you want chat on some pages only, create a Page View trigger set to fire on Some Page Views and add a condition on Page Path. Two common patterns:
- Exclude a section: Page Path does not start with /checkout.
- Only key pages: Page Path matches your pricing, contact and service pages.
You don't need a DOM Ready or Window Loaded trigger for the widget. Those fire later and only delay the chat button.
Don't worry about the tag firing twice in an edge case. The widget mounts once per bot and ignores a second load on the same page.
Decide on consent
This is the part most installs skip.
Google's Tag Manager help says Custom HTML tags do not have built-in consent checks. Each tag has Consent Settings under Advanced Settings, with three choices:
- Not set: no additional checks. The tag fires whenever its trigger fires.
- No additional consent required: the same behaviour, but recorded as a deliberate decision.
- Require additional consent for tag to fire: the tag fires only if every consent type you list is granted.
The consent types Tag Manager supports include functionality_storage, analytics_storage, personalization_storage, security_storage and the advertising ones.
Which you choose is a decision for whoever owns your privacy setup, not something a vendor should make for you. To help that conversation, here is exactly what SpideyChat's widget stores in the browser:
- It sets no cookies.
- The script on your page keeps one session storage flag, so the greeting bubble shows only once per visit.
- When a visitor opens the chat, the chat frame (served from spideychat.com) stores an anonymous visitor ID in local storage to count returning visitors, plus the visitor's sound on or off choice.
If you require consent before the tag fires, remember the trade-off. Visitors who decline won't see the chat at all, including the ones with a question about your service. Our GDPR checklist for a website assistant covers what to tell visitors and how long to keep transcripts.
Tag Manager can show all of this in one place. Google's help says you can turn on Enable consent overview under Admin, Container Settings, and the overview then lists which tags have consent configured.
Test in Preview, then publish
Saving a tag doesn't put it live. Use Preview first: Tag Manager opens your site connected to Tag Assistant, which shows which tags fired and in what order. Check that the chat tag fired on a normal page, and didn't fire on any page your trigger excludes.
Then click Submit and publish. Google's help says every publish records a version of the container, so if something goes wrong you can roll back to the previous version.
Finally, test the live site in a private window. If the chat button doesn't appear:
- Open the browser console and filter for "SpideyChat". The widget writes a line there for a missing bot ID or a website that isn't on the chatbot's license.
- Check the license. A SpideyChat chatbot registers the first website it loads on, and other websites need adding under License & websites on the chatbot's page. Free covers 1 website per chatbot, Starter 3 and Pro 10.
- Work through our troubleshooting checklist for caches and security policies.
The trade-offs of installing through GTM
Tag Manager is convenient, but it adds a layer.
- It depends on the container. If Tag Manager doesn't load, for example because a browser extension blocks it, every tag inside it goes too, including the chat. A script tag in your site's footer doesn't have that dependency.
- It's one more place to look. When someone asks "where does the chat come from?", a developer reading the site's code won't find it. Note it in your container's tag name and in your site documentation.
- It's the right choice when code access is the bottleneck. If changing the footer means a ticket to a developer, Tag Manager gets the chat live today, and you can move it into the code later.
If you do have access to your platform's footer or code settings, the integrations page lists the direct route for WordPress, Shopify, Wix, Squarespace and Webflow.
Next step
Build the tag, test in Preview, publish, and check the console once. The install the widget doc has the snippet to paste into your tag, plus the direct routes for the common platforms if you later move it into your site's code.