=== ChatterLab ===
Contributors: your-wordpress-username
Tags: chat, ai, chatbot, customer support, live chat
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add your ChatterLab AI chat assistant to your WordPress site.

== Description ==

ChatterLab is an AI chat assistant for your website. In your ChatterLab account you give your agent your own knowledge, such as web pages, documents and answers you write. On your site it answers visitors' questions from that knowledge, in the language they write in.

This plugin puts your agent on your WordPress site without touching your theme. Save your Agent ID under **Settings > ChatterLab** and a chat button appears in the bottom corner of every page. The chat itself only loads when a visitor opens it.

On the settings page you choose:

* **Agent ID**: which of your ChatterLab agents talks to your visitors. You can paste the whole snippet from ChatterLab; the plugin keeps only the ID.
* **Widget language**: the language of the chat's own texts, or **Automatic (the agent's own)** to use your agent's language settings.
* **Address**: only for agencies that serve ChatterLab from a domain of their own.

Everything else, such as what your agent knows, its colours and texts, and which sites may show it, is set in ChatterLab.

You need a ChatterLab account with an agent. ChatterLab has a free plan. The chat is a service that ChatterLab runs: read **External services** below for what that means for your visitors' data.

== Installation ==

1. In WordPress, go to **Plugins > Add Plugin**, search for **ChatterLab**, install the plugin and activate it.
2. In ChatterLab, open your agent's **Deploy** page and copy the snippet under **Chat widget**.
3. In WordPress, go to **Settings > ChatterLab**, paste the snippet into **Agent ID** and click **Save Changes**.
4. Back on the **Deploy** page in ChatterLab, add your site's address under **Allowed domains**, so that no other website can show your agent.

The [WordPress guide](https://chatterlab.ai/en/docs/widget/wordpress) in the ChatterLab documentation walks through the same steps.

== Frequently Asked Questions ==

= Where do I find my Agent ID? =

In ChatterLab, on your agent's **Deploy** page. It is part of the snippet under **Chat widget** and starts with `ag_`. You can paste the whole snippet into the **Agent ID** field: the plugin keeps only the ID.

= The chat button does not appear. What can I check? =

* Is an Agent ID saved under **Settings > ChatterLab**? Without one the plugin adds nothing to your pages.
* If your agent has **Allowed domains**, is your site's address among them, exactly as visitors see it, with or without `www`?
* Does your site use a caching plugin? Clear its cache after you save the settings.
* Does your site send a Content Security Policy? Then it has to allow the ChatterLab address. [Install the widget](https://chatterlab.ai/en/docs/widget/install) lists where.

= Can I show the chat on some pages only? =

Not with this version. The plugin adds the chat button to every page of your public site. It never loads in the WordPress admin or on the login page.

= Does the chat set cookies? =

No. Once a visitor sends a message or a file, the chat keeps two values in the browser's session storage until the tab is closed: a random visitor number and the number of the conversation. Neither says anything about the person.

= Which languages does the chat speak? =

Its own texts, such as its buttons and the notice that the visitor is talking to an AI, come in English, Dutch, French, German and Spanish. Your agent answers in the language the visitor writes in.

= I pasted the ChatterLab snippet into my theme before. Should I remove it? =

Yes, once the plugin shows the chat, so that the chat is loaded from one place only.

= Does it slow my site down? =

Hardly. The script loads at the end of the page without holding it up, and draws only the button. The chat itself loads when a visitor opens it for the first time.

== External services ==

This plugin relies on ChatterLab, an AI chat service run by SRI Group BV, Antwerp, Belgium. Without it the plugin does nothing.

**What the service does.** It shows the chat on your pages and answers your visitors' questions from the knowledge you gave your agent in your ChatterLab account.

**When data is sent.** The plugin itself makes no requests from your server, and adds nothing to your pages until you save an Agent ID. From then on, every page of your site loads the widget script from https://chatterlab.ai, or from the address under **Address** if you changed it, and the visitor's browser talks to that address directly:

* On every page view, the browser loads the widget script and your agent's button settings. As with any file loaded from another server, the request carries the visitor's IP address, their browser and your site's address. With **Widget language** on **Automatic**, it also says which of the chat's five languages the visitor's browser prefers.
* When a visitor uses the chat, it sends the messages they write and the address of the page they are on, without the part after `?` or `#`. Where you switched these on for your agent, it also sends the files a visitor attaches and the details they leave in the contact form or in a ticket.

**Who governs the data.** The conversations are kept in your ChatterLab account, where you can read and delete them. You are the controller of what your visitors write; ChatterLab processes it on your behalf. Mention ChatterLab in your site's privacy policy.

* [ChatterLab](https://chatterlab.ai)
* [ChatterLab privacy notice](https://chatterlab.ai/en/privacy): what ChatterLab stores, who processes it and for how long.

<!-- TODO(owner): ChatterLab has no terms of use page yet. Guideline 6 asks for a link to the service's terms of use: add "* [ChatterLab terms of use](https://chatterlab.ai/en/terms)" to the list above once that page exists. -->

== Changelog ==

= 1.0.0 =
* First release: the ChatterLab chat on every page of your site, set up under Settings > ChatterLab.
