=== Clvrly ===
Contributors: clvrly
Tags: ai assistant, chatbot, 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: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

An AI assistant that knows your website. It answers visitor questions 24/7 using your own pages, so they find what they need and get in touch.

== Description ==

Clvrly adds an AI website assistant to your WordPress site. It reads your website, learns what you offer, and answers visitors' questions instantly, any time of day. Visitors get answers in seconds instead of hunting through menus or waiting for a reply.

This plugin connects your WordPress site to your Clvrly account. Paste your token, save, and the assistant is live. No code, no theme editing.

= Set up in about a minute =

1. Paste your token (or your whole install snippet; the plugin picks the token out).
2. Click Save.
3. The plugin checks everything for you and tells you, in plain English, if anything needs fixing.

= Built-in installation check =

Most "the chatbot isn't showing" problems come down to a handful of causes. Clvrly checks for all of them and tells you exactly what to do:

* Is your token valid, and is your account active?
* Does your Clvrly account's domain match this site?
* Is your subscription active, and has Clvrly finished learning your website?
* Is the assistant actually on your homepage, or is a cache serving an old copy?
* Is it loaded twice because of an old snippet in your theme?
* Has an optimisation plugin rewritten or delayed the script?

The same check appears in **Tools → Site Health**, runs quietly once a day, and shows a notice on your Dashboard if something breaks.

= Features =

* **Fast setup:** paste your token or your whole install snippet.
* **Live status:** see at a glance whether the assistant is live on your site.
* **Show it inside a page:** add the **Clvrly Assistant** block, or the `[clvrly]` shortcode for page builders, to build the assistant into a help or contact page.
* **Per-page control:** switch on "Hide the assistant on this page" from the block editor sidebar (or the classic editor), or list page IDs in the settings.
* **Choose who sees it:** everyone, or only visitors who aren't logged in.
* **Pause any time:** switch the assistant off without losing your settings.
* **Stays out of the way:** doesn't load inside Elementor, Divi, Beaver Builder, Bricks, Oxygen and other page-builder editors, or on AMP pages.
* **Works with caching and optimisation plugins:** WP Rocket, LiteSpeed Cache, Autoptimize, SiteGround Optimizer, Perfmatters and Cloudflare Rocket Loader.
* **Fast:** the script loads with `defer` and an early connection hint, so it never blocks your page.
* **Survives theme changes and updates.**
* **For agencies and developers:** WP-CLI commands, a `CLVRLY_TOKEN` constant for wp-config.php, and filters.

Appearance, behaviour, answers and reporting are all managed in your Clvrly portal at [clvrly.com](https://clvrly.com/). Changes appear on your site automatically.

**You need a Clvrly account to use this plugin.** You can create one at [clvrly.com](https://clvrly.com/register.php).

= For developers =

* `wp clvrly connect <token>`, `wp clvrly check`, `wp clvrly enable`, `wp clvrly disable`, `wp clvrly disconnect`
* `define( 'CLVRLY_TOKEN', '…' );` in wp-config.php sets the token and locks the field.
* `clvrly_should_load` filter: return false to stop the assistant loading on the current request.
* `clvrly_script_attributes` filter: change the attributes on the script tag.

== External services ==

This plugin connects to Clvrly (https://clvrly.com), the service that runs the AI assistant. Without it, the plugin has no function.

**Loading the assistant on your site.** On every public page where the assistant is shown, the visitor's browser loads `https://clvrly.com/concierge.js`. Your Clvrly token and the page's web address are sent to Clvrly so it can load your assistant's settings. When a visitor uses the assistant, the messages they type, the page they are on and basic technical information (such as browser type) are sent to Clvrly so it can answer. Clvrly may store a visitor identifier in the visitor's browser so conversations can continue between pages.

**Checking the installation.** Once a token is saved, your site sends your token, your site address and the plugin version to `https://clvrly.com/api/install/ping.php` to confirm the token, domain, subscription and website scan status. This happens when an administrator opens Settings → Clvrly (at most every 12 hours) or clicks "Check again", when Tools → Site Health runs, and once a day in the background. No visitor data is sent. As part of the same check, your site also loads its own homepage to confirm the assistant script is present; that request stays on your site.

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

== Installation ==

1. In your WordPress dashboard, go to **Plugins → Add New**, search for **Clvrly**, then click **Install Now** and **Activate**.
2. Log in to your [Clvrly portal](https://clvrly.com/portal/) and open **Your Embed Code**. Copy the snippet, or just the `data-token` value.
3. In WordPress, go to **Settings → Clvrly**, paste it into **Token** and click **Save settings**.
4. The status card at the top tells you when the assistant is live, or what to fix.

If you previously added the Clvrly script by hand (in header.php or with a header/footer plugin), remove it so the assistant isn't loaded twice. The installation check warns you if it finds a duplicate.

== Frequently Asked Questions ==

= Do I need a Clvrly account? =

Yes. The plugin connects your site to Clvrly, which runs the assistant. You can sign up at [clvrly.com](https://clvrly.com/register.php).

= Where do I find my token? =

In your Clvrly portal, open **Your Embed Code**. Your token is the `data-token` value in the snippet, a long string of letters and numbers. You can paste the whole snippet into the plugin and it will pick the token out.

= The assistant isn't showing on my site =

Open **Settings → Clvrly** and click **Check again**. The status card lists anything that needs fixing, such as a domain mismatch, a cache serving an old page, or an optimisation plugin interfering. Then:

1. Clear your caching plugin's cache and any host or CDN cache (for example Cloudflare).
2. Check the page in a private browser window. If **Who sees it** is set to logged-out visitors only, you won't see the assistant while logged in.

= How do I change how the assistant looks? =

Everything about the assistant, including colours, position, welcome message and mobile visibility, is managed in your Clvrly portal. Changes appear on your site automatically.

= Can I put the assistant inside a page instead of a floating button? =

Yes. Add the **Clvrly Assistant** block where you want it, or use the `[clvrly]` shortcode in page builders such as Elementor. Set **Display mode** to **Inline** in your Clvrly portal for it to take effect.

= Can I hide the assistant on certain pages? =

Yes. In the block editor, open the page's settings sidebar and switch on **Hide the assistant on this page** in the Clvrly assistant panel. You can also list page or post IDs under **Hide on these pages** in Settings → Clvrly. Developers can use the `clvrly_should_load` filter.

= Can I hide it from logged-in users? =

Yes. Under **Who sees it**, choose **Only visitors who aren't logged in**.

= Does this slow down my site? =

No. The script loads with `defer`, so it doesn't block your page from displaying, and the plugin opens the connection to Clvrly early so the assistant appears quickly.

= Does it work with multisite? =

Yes. Each site in the network has its own token and settings.

= What happens when I delete the plugin? =

All of its settings, stored check results and per-page options are removed from your database.

== Screenshots ==

1. Settings → Clvrly: live status, settings and quick links to your Clvrly portal.
2. The installation check spots common problems and explains how to fix them.
3. "Hide the assistant on this page" in the block editor sidebar.
4. The Clvrly assistant on a website.

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
