=== Jugl Chat Widget ===
Contributors: tarasjugl
Tags: chat, chatbot, live chat, support, jugl
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add the Jugl chat widget to your WordPress site. Paste your Jugl token and the chat bot loads automatically on every front-end page.

== Description ==

Jugl Chat Widget connects your WordPress site to the [Jugl](https://jugl.com/) chat service. After activating the plugin, go to **Settings → Jugl Chat Widget**, paste the token provided by Jugl, and the chat widget will appear on every public page of your site.

Features:

* Simple one-field setup — just paste your Jugl token.
* Optional configurable base URL (defaults to `https://chat-bot.jugl.com`) for staging or custom environments.
* Loads asynchronously after the page has finished loading, so it never blocks rendering.
* No widget is shown until you provide a token, and clearing the token instantly disables it.

= Third-party service disclosure =

This plugin loads a chat widget served by Jugl, a third-party service. When enabled, it injects a small inline script that loads the loader file `bot.min.js` from the configured base URL (by default `https://chat-bot.jugl.com/bot.min.js`) and passes your Jugl token and the chatbot URL to it. The widget then communicates with the Jugl chat service to render the chat experience and exchange chat messages between visitors and your Jugl workspace.

By using this plugin you agree to Jugl's terms and privacy policy:

* Service: https://jugl.com/
* Terms of Service: https://jugl.com/terms
* Privacy Policy: https://jugl.com/privacy

Please ensure your site's privacy policy discloses the use of this third-party chat service.

== Installation ==

1. Upload the `jugl-cx-widget` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress **Plugins** screen directly.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Settings → Jugl Chat Widget**.
4. Paste your Jugl token. Optionally change the chatbot base URL (defaults to `https://chat-bot.jugl.com`).
5. Save changes. The chat widget now appears on all front-end pages.

== Frequently Asked Questions ==

= Where do I get my token? =

Your token is provided by Jugl. It is a long string that typically ends with `==`.

= How do I disable the widget temporarily? =

Clear the token field in **Settings → Jugl Chat Widget** and save. With no token set, the plugin injects nothing.

= Can I point the widget at a staging or development environment? =

Yes. Change the **Chatbot base URL** field to your environment's URL (for example a staging domain). The loader script is fetched from `<base URL>/bot.min.js` and the same base URL is passed to the widget.

= Does the widget slow down my site? =

No. The loader is injected after the page's `load` event and the script is loaded asynchronously, so it does not block page rendering.

= Does this plugin send data to a third party? =

Yes. It loads a chat widget from the Jugl service. See the "Third-party service disclosure" section of the description for details.

== Screenshots ==

1. The Jugl Chat Widget settings page under Settings → Jugl Chat Widget.
2. The chat widget displayed on the front end of a site.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release of Jugl Chat Widget.
