The AI assistant on your own site
A chat button in the corner of your online store. Shoppers ask in their own words, in their own language — “a leather bag for every day under 3,000 UAH” — and the assistant answers from your Ktalog catalog: product cards with photos, your prices and stock, links to your product pages or your contacts.
It comes with the AI assistant add-on (Mini, Standard or Pro), on any plan, and you can try it on your own catalog in your dashboard first. One line of code installs it. The button weighs under 7 KB and appears once your page has finished loading, and the chat itself loads only when a shopper opens it, so your pages stay as fast as they were.
Before you start
- 1
Make sure the AI assistant add-on is active: Dashboard › AI assistant.
- 2
In the same place, under AI assistant on your site, switch on Show the assistant on my site.
- 3
Add your site’s domains: every address shoppers open, for example shop.ua and www.shop.ua (they are different addresses). *.shop.ua covers every subdomain. Ktalog suggests the addresses it knows from your store’s settings.
- 4
Choose the button’s corner and colour and, if you like, your own greeting and up to four starter questions. Click Save: your site shows the changes within a minute.
How to add the AI assistant
Copy the line from your dashboard (it already has your store’s name) and paste it once into your site’s template, just before </body>, so it is on every page:
<script src="https://ktalog.ai/widget.js" data-store="your-store" async></script>
That is all: no keys, nothing to update later. The address stays the same, and the loader updates itself.
The chat speaks the language of your page (its lang attribute), else the shopper’s browser language, else your catalog’s. To fix the language, add data-lang="uk" (or en, de, pl…) to the tag.
Instructions by platform
Menu names can differ between versions and themes. If you can’t find the place, write to us and we’ll help.
WordPress and WooCommerce
Install the free WPCode plugin (formerly Insert Headers and Footers), open Code Snippets › Header & Footer and paste the line into Footer, then save. Or add it to your theme’s footer.php before </body> (a child theme keeps it through updates).
Horoshop
Settings › General settings › Scripts, the field Before </body>; save.
OpenCart
Design › Theme Editor, choose your theme and common/footer.twig, paste the line before </body> and save. Then refresh the theme cache: Dashboard, the gear icon, Theme › refresh.
Shopify
Online Store › Themes, ⋯ › Edit code, open layout/theme.liquid, paste the line before </body> and click Save.
Plain HTML and other site builders
Before </body> on every page, or once in the template or footer your pages share. In a site builder, look for a setting like Custom code or Code before </body> for the whole site.
Google Tag Manager
A Custom HTML tag with the same line, triggered on All Pages. We haven’t tested every Tag Manager setup yet: if the button doesn’t appear, paste the line into the site instead.
Prom.ua
We haven’t verified whether Prom.ua sites accept third-party scripts. If yours has no field for such code, the assistant can’t be added to it: write to us before you take the add-on.
Carts from AI chats, without the assistant
When a shopper asks an AI chat such as ChatGPT or Claude for several of your products at once, it can give one link to your store’s cart. Shopify and WooCommerce 10 or newer open such a link by themselves. For a store on WooCommerce older than 10, OpenCart 3 or Horoshop, the same line of code fills the cart instead, with or without the AI assistant add-on.
- 1
Open Dashboard › Store Settings and, under Publication in AI chats, switch on Carts from AI chats through Ktalog’s script.
- 2
List your site’s domains in the same block: every address your site opens at, with and without “www” if both work (shop.ua and www.shop.ua are different addresses). It is the same list as the AI assistant’s. Click Save.
- 3
Paste the line shown under the block once into your site’s template, before </body>. It is the same line as the AI assistant’s (Instructions by platform above says where), so if it is already on your site, there is nothing more to paste.
- 4
Open any page of your site. The block then says when the script was last seen there, and from then on AI chats can give cart links for your store; Dashboard › Integrations says whether your store gets them and, if not, why.
In this mode the script shows nothing on your pages. It acts only for a visitor who came by a cart link from an AI chat: it adds that link’s products to your store’s own cart, as your site does when a shopper adds a product, takes its mark out of the page’s address, so that a reload adds nothing twice, and opens the cart page. On Horoshop the products go into the cart and the shopper stays on the product’s page. A product your cart doesn’t take as it is, such as an OpenCart product with required options, is not added.
It fills the cart of OpenCart 3; it does not fill the cart of OpenCart 4 yet. Shopify doesn’t need it. On WooCommerce 10 or newer the store’s own link replaces what the shopper had in the cart; with the script, the products are added to it instead.
The script fills a cart only on the addresses you listed, and within 30 minutes of the shopper’s click on the cart link; later, the shopper opens the link from the chat again. When it doesn’t, the browser’s console says why in a line starting with [Ktalog assistant].
What shoppers see
- A button in the corner you chose, in your colour. The chat opens as a panel next to the page; on a phone it fills the screen, and its close button returns to the page.
- A notice that answers are AI-generated and may contain mistakes, with what happens to their messages.
- Product cards with your photos, prices, sale prices and stock, straight from your catalog, and a link to the product on your site — or your contacts, when a product has no link or you take orders by phone or messenger.
- An Add to cart button on product cards, for stores on Shopify, WooCommerce, OpenCart 3 and Horoshop, once “Add to cart” button on product cards is switched on (Dashboard › AI assistant, under AI assistant on your site). The shopper presses it, choosing a size or colour first where the product has them, and the product goes into your store’s own cart, which the card then says; where the cart doesn’t take it, the card gives the product’s link instead. The assistant itself never presses it, and it isn’t shown in the preview in your dashboard.
- An invisible bot check (Cloudflare Turnstile) when a conversation starts. If it fails, the chat shows your contacts instead.
- “Powered by Ktalog” under the chat; with the Pro add-on you can hide it on your site.
Privacy and your site
- No cookies. The button keeps one note in the browser tab (sessionStorage) so a conversation can go on across your pages; it holds only the time of the last answer.
- Shoppers’ messages are kept only while the chat is active and deleted 24 hours after the last one. They are processed by Anthropic to write the answers; the bot check by Cloudflare. See the privacy policy.
- The chat runs in Ktalog’s own frame: it can’t read your page, and your page can’t read the conversation.
- When the script fills a cart from a cart link (Carts from AI chats, without the assistant above), it sets no cookie and keeps one note in the browser (localStorage): which cart links it has already filled a cart from, so that a reload adds nothing twice; it ignores each entry after 30 minutes. Of what the script sends Ktalog, Ktalog keeps only which of the link’s products your store’s cart accepted and when the script was last seen on your site, as counts, with nothing about the visitor.
- A conversation counts against your add-on’s conversations at its first answered message; opening the chat counts nothing.
Questions and answers
If the button doesn’t show, open your site, then the browser’s console (F12, or right-click › Inspect › Console). The assistant writes one line starting with [Ktalog assistant] saying why it isn’t shown.
The button doesn’t appear, and the console says the page is not among the allowed domains
Add exactly the address you see in the browser’s address bar to Your site’s domains: with or without www, and with its port if it has one (shop.ua:8080). Save, then reload the page after a minute.
The console says there is no add-on, the store or catalog isn’t published, or the assistant is switched off
The assistant appears on your site only while the AI assistant add-on is active, your catalog is published, and Show the assistant on my site is on. If your catalog stops being published, the add-on pauses and its automatic renewal stops; published again, the assistant works until the paid period ends, and then you take the add-on again.
The button was there and disappeared
New conversations are paused for one of two reasons, and Dashboard › AI assistant says which. Today’s limit of new conversations is reached (it keeps one busy day from using up the whole period): the button comes back at midnight UTC. Or the period’s conversations are used up, and so are your packs: it comes back when the add-on renews or when you buy a pack. Either way, shoppers already in a conversation can finish it. You also get an email at 80 % of the period’s conversations and when they run out. The button also goes if your catalog stops being published: see the answer above.
The console mentions the Content-Security-Policy
Add the lines from the Content-Security-Policy answer below to your policy. If you use a path in script-src (…/widget.js), use the address alone instead: the loader also reads its settings from Ktalog.
The chat panel says it couldn’t open
Something blocked the chat’s frame: the page’s policy, a domain you removed a moment ago, or an extension. The panel then offers a link to open the chat in a new tab, so shoppers can still ask.
An ad blocker or privacy extension
Some extensions block third-party scripts or Cloudflare’s bot check. The shopper then sees no button, or your contacts instead of the chat: nothing breaks, and there is nothing to fix on your side.
It doesn’t show in the theme editor or preview
Theme previews (Shopify’s editor, the WordPress customizer) run on another address, which isn’t one of your domains. Check on your live site.
My site has a Content-Security-Policy: what do I add?
Most shops don’t set one. If yours does (the Content-Security-Policy header or a meta tag), add Ktalog to these directives — next to the sources you already list:
script-src https://ktalog.ai; frame-src https://ktalog.ai; connect-src https://ktalog.ai;
frame-src is for the chat, and connect-src for carts from AI chats: after filling a cart, the script tells Ktalog which of the link’s products your cart accepted. Add the connect-src line only if your policy already has connect-src or default-src, putting Ktalog next to the sources that directive lists ('self' kept); a policy with neither needs nothing for it. Where the policy blocks the confirmation, the cart is still filled, and your dashboard counts it as not confirmed.
Nothing else is needed: the button’s settings load as a script, its styles need nothing in style-src (no 'unsafe-inline'), and the chat, with its bot check, runs inside Ktalog’s own frame. If your script-src uses nonces with 'strict-dynamic', put your nonce on the script tag instead of adding the address there. When the policy blocks Ktalog, the browser’s console says so in a line starting with “[Ktalog assistant]”.
Will the assistant affect my PageSpeed Insights score?
Shoppers’ browsers don’t wait for the button: the line loads in parallel with your page, and the button sets itself up only once the page has loaded. PageSpeed Insights, though, estimates how a slow phone would load the page, and in that estimate any script from another site that loads with the page, this one too, can delay Largest Contentful Paint. On our small test page it went from 0.9 s to 1.35 s; the score stayed 100, and Total Blocking Time and layout shift stayed at zero.
If that matters to you, use this line instead. It loads the assistant 2 seconds after your page, so PageSpeed Insights measures the page as it does without it:
<script>(function(){function k(){var s=document.createElement("script");s.src="https://ktalog.ai/widget.js";s.async=true;s.setAttribute("data-store","your-store");document.body.appendChild(s)}function l(){setTimeout(k,2000)}document.readyState=="complete"?l():addEventListener("load",l)})()</script>Put your store’s name in place of your-store (the dashboard shows this line with it filled in). The button then appears about 2 seconds after the page has loaded; everything else works the same.
It is an inline script, so it runs only where the page allows them: on a site with a Content-Security-Policy, use the usual line from How to add the AI assistant above.
Questions or a platform not listed? Write to support@ktalog.ai.