AI Tema
Skip to content
AI Tema
What it doesChannelsQuestions
Wiki
EN
РусскийRUEspañolESSrpskiSREnglishEN
Log in
AI Tema wiki
Before installationReady-to-use codeWhere and how to installInstallation detailsVerify installationCommon questions
AI Tema wiki/Google Tag Manager

Google Tag Manager · AI Tema

Install a chatbot through Google Tag Manager

If a GTM web container is already installed, add chat without editing your site template. This example creates the widget script programmatically and preserves the connection ID in its attributes.

Instructions checked: October 30, 2026

Open dashboard ↗Appearance and JavaScript API

Before installation

  1. Create a Website chat connection in AI Tema and allow your live HTTPS domain. The www and non-www addresses work together; allow other subdomains separately.
  2. Assign an incoming-message workflow to the website and activate it. Saving a draft alone does not start the bot.

Every platform uses the same lightweight AI Tema widget. It runs your workflows and does not automatically access orders, CMS data or personal data from your website.

Ready-to-use code

Custom HTML → DOM Ready

The UUID from data-account in your dashboard widget snippet. This is a public connection ID, not a password or token.

Enter your ID to generate code for your website.

HTML
<script>
(function () {
  var account = 'ACCOUNT_ID';
  var sdk = window.Aitema;
  if (sdk && sdk.version && sdk.get(account)) return;
  if (document.querySelector('script[data-aitema-account="' + account + '"]')) return;

  var script = document.createElement('script');
  script.src = 'https://api.aitema.cloud/api/v1/chat/widget.js';
  script.async = true;
  script.setAttribute('data-account', account);
  script.setAttribute('data-aitema-account', account);
  script.onerror = function () {
    if (script.parentNode) script.parentNode.removeChild(script);
  };
  document.body.appendChild(script);
})();
</script>

Where and how to install

  1. Open the correct website’s web-container workspace. GTM itself must already load on public pages.
  2. Create an AI Tema tag: Tags → New → Custom HTML. Paste the entire generated code, including its enclosing script tags.
  3. Create a Page View → DOM Ready trigger. Choose all DOM Ready events or the relevant pages and attach it to the tag.
  4. Use Preview to connect your website and check tag execution and the chat launcher. Then Submit → Publish and Create Version → Publish; saving a draft is not enough.

Installation details

  • The example uses plain JavaScript, without JSX. Repeated execution does not add a second loader for the same ID.
  • Check the tag’s trigger rules and container settings: chat appears only when GTM permits execution. Do not also install the same widget directly in the CMS.
Official platform documentationGoogle: Custom HTML tags ↗Google: DOM Ready triggers ↗Google: preview and publish ↗

Verify installation

  1. Visit the published website on the domain allowed in AI Tema. Clear the page cache if the widget has not appeared after your update.
  2. Open the chat and send a message. Complete the workflow to collect contact details; add the “Mark as lead” action to record a lead.
  3. Find the contact in “Contacts and leads” and open the conversation. Check the mobile view and navigation between pages.

Common questions

Can I use a server-side GTM container?

This code runs in the browser and needs a web container on the page. A server-side container alone does not render a chat launcher.

Why is chat visible in Preview but not for visitors?

Check that the new container version is published, the domain is allowed and the trigger conditions match. Preview does not publish changes for everyone.

Other installation guides

functions.php

WordPress

Install AI Tema chat on WordPress with ready-to-use PHP and HTML. Includes child-theme setup, WordPress.com requirements and lead verification.

↗
HEAD

Tilda

Add AI Tema chat to Tilda through site HEAD settings or a T123 block. Includes a ready script, publishing steps and lead collection checks.

↗
layout/theme.liquid

Shopify

Connect AI Tema to a Shopify storefront with ready theme.liquid code, installation steps, domain checks and checkout limitations.

↗
Custom Code

Wix

Add AI Tema to Wix with a ready script, Body end placement, site-wide loading and published-domain checks through Custom Code.

↗
Footer code

Webflow

Connect AI Tema chat to Webflow with a ready Footer code snippet. Covers site settings, publishing and Webflow plan requirements.

↗
/local/templates/…/footer.php

1С-Битрикс

Install AI Tema on 1C-Bitrix through footer.php. Ready widget code, active-template selection and lead checks without a marketplace module.

↗
HEAD

Bitrix24 Sites

Add AI Tema to Bitrix24 Sites through custom HTML. Ready HEAD code, page-level settings and plan requirements for a published website.

↗
Custom Code → Before </body>

TapTop

Add AI Tema to TapTop with a script before body. Includes project-wide and page-level installation, publishing and custom-code requirements.

↗
Settings → General → HTML

Taplink

Connect AI Tema to Taplink through Settings → General → HTML code. Ready script, insertion scope and mobile chat verification.

↗
Códigos externos → Para la Tienda

Tiendanube

Install AI Tema in Tiendanube through Códigos externos. Ready storefront code, a Google Tag Manager alternative and checkout limitations.

↗
Сайт → Счётчики и коды → body

InSales

Add AI Tema to InSales without editing your theme. Ready HTML script, shared body insertion and conversation checks for your online store.

↗
Instant Site → Custom JavaScript code

Ecwid

Add AI Tema to Ecwid Instant Site through Custom JavaScript code. Ready script, supported plans and guidance for stores embedded in another CMS.

↗
Custom Code → Add Script

Framer

Install AI Tema in Framer through Custom Code and Add Script. Ready HTML, Once execution, page selection and navigation verification.

↗
index.html

HTML

Add AI Tema to a plain HTML website with one script. Covers body placement, shared templates, allowed domains and installation checks.

↗
src/AitemaChat.jsx

React

Install AI Tema in React with a ready useEffect component, single SDK loading and unmount cleanup. Add SPA chat without duplicate launchers.

↗
app/components/AitemaChat.jsx

Next.js

Add AI Tema to Next.js App Router with a ready next/script component, afterInteractive loading and a shared layout without duplicate downloads.

↗
AI Tema

Automated replies and lead collection for your business.

My accountTry a workflow
© 2026 AI Tema
DocumentationPrivacy PolicyTerms of Service
A gomvp.dev product ↗