KlientBrain AI VisibilityDocs
Help Sharing

Add the tracking script with Google Tag Manager

Import a template into Google Tag Manager to count visits from AI assistants, for sites that use a website builder.

Website builders such as Shopify, Webflow, Wix and Squarespace do not give us a log file to read. If your site already runs Google Tag Manager, a template adds the tracking script without editing your pages. It counts visits that arrive from AI assistants such as ChatGPT, Perplexity, Gemini and Copilot. It shows on the Visitors from AI card, not on AI crawlers, because it sees people who clicked through, not crawlers.

Set it up

  1. On the Visitors from AI card choose Tracking script and find the data-site value. That is your site ID.
  2. Download the template.
  3. In Tag Manager choose Templates, then New under Tag Templates. Open the More Actions menu, choose Import, and pick the file you downloaded. Save it.
  4. Choose Tags, then New, and pick KlientBrain AI visitors as the tag type.
  5. Paste your site ID into Site ID.
  6. Set the trigger to Initialization - All Pages, name the tag, and save it.
  7. Use Preview to check the tag fires, then choose Submit to publish the container.

Google describes importing and exporting templates in Custom templates.

Check it works

Visit your site from a link in an AI assistant, or add ?utm_source=chatgpt.com to a page address. The visit then shows on Visitors from AI. Visits that did not come from an AI assistant send nothing.

What is sent

Only when a visit arrived from an AI assistant: your site ID, the assistant's address and the page path. No cookies are set, and visitors whose browser sends Global Privacy Control are not counted.

Good to know

  • The template can load only the one script address it was built for.
  • Your website builder or consent tool may hold tags back until a visitor agrees. Visits before that are not counted.
  • Nothing here has been run in a real container yet. If a step does not match what you see, tell us.

Need help?

Email support@klientbrain.com and tell us what you were doing.