=== Parťák na web ===
Contributors: partaknaweb
Tags: ai chatbot, ai assistant, chatbot, customer support, voice
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

Adds the Parťák na web AI assistant to your site: answers visitors from your content, points to the right spot on the page.

== Description ==

Parťák na web is an AI assistant for business websites, built for Czech websites (the dashboard is in Czech). This plugin puts it on your WordPress site without editing your theme: paste your widget ID, save, and the assistant appears on your public pages.

The assistant itself runs as a service at partaknaweb.cz. You need a Parťák account: there is a free Start plan, and paid plans are listed at [partaknaweb.cz/cenik](https://partaknaweb.cz/cenik).

= What the assistant does on your site =

* **Answers from your own content.** Its knowledge comes from your website, uploaded documents and texts you write. It re-reads your website once a week (a product feed once a day). When something is not in its knowledge, it does not make it up.
* **Shows its sources.** For prices and sensitive topics it shows where the information comes from.
* **Shows visitors the right place.** When a visitor asks about something on the page, it scrolls there, highlights the sections one by one and says a sentence about each. The visitor can pause at any time.
* **Acts on the page for the visitor.** It can click, choose from menus, scroll and open other pages. The actions it may take are set per widget.
* **Fills in forms, with the visitor in control.** In a typed conversation it fills a field straight away and the visitor can take the change back with one button; by voice it asks before filling. Submitting a form, adding to cart and custom actions always wait for the visitor's confirmation. Unless you list the forms it may use, it only fills contact forms, never search boxes, passwords, payment details or hidden fields.
* **Checks its own work.** After each action it checks whether the page really changed. If it cannot confirm that, it marks the action as unverified and never says it is done.
* **Hands over to your team.** When a visitor asks for a person, or the assistant does not have enough to go on, the request goes to you by e-mail or webhook, and the visitor can leave a contact.
* **Voice.** Visitors can talk to it instead of typing (paid plans). The browser asks for microphone permission; the widget never asks a second time.

= What this plugin does =

* Adds **Settings → Parťák na web** with one field for your widget ID. You can paste the bare ID or the whole embed code from your dashboard; only the ID is saved.
* Lets you turn off the `/` keyboard shortcut (for sites with their own search box or editor).
* Loads the widget script on public pages, asynchronously in the footer. It is never loaded in the WordPress administration.
* Shows one dismissible notice on the Plugins screen until a widget ID is saved.

Everything else (appearance, knowledge, allowed domains, publishing) is set in your Parťák dashboard. The plugin does not call any API, create accounts, add links to your pages or collect statistics. Deleting the plugin removes its settings.

== Installation ==

1. Create a Parťák account at [app.partaknaweb.cz](https://app.partaknaweb.cz/register) (the Start plan is free).
2. In the Parťák dashboard, open **Instalace** (Installation) and add your website's domain to the allowed domains.
3. Copy the embed code (or just the widget ID) from the same page.
4. In WordPress, install and activate this plugin, then go to **Settings → Parťák na web**, paste the code and save.
5. Publish the widget in the Parťák dashboard if you have not done so yet, then open your site in a private window.

== Frequently Asked Questions ==

= Do I need a Parťák account? =

Yes. The plugin only loads the assistant; the assistant runs on partaknaweb.cz. The Start plan is free. Paid plans are listed at [partaknaweb.cz/cenik](https://partaknaweb.cz/cenik).

= Where do I find the widget ID? =

In the Parťák dashboard on the **Instalace** (Installation) page. You can paste the whole `<script>` code from there; the plugin keeps only the ID.

= The widget does not appear on my site =

Three things must all be true: the code is on the page, your domain is among the allowed domains in the dashboard, and the widget is published. Check them in this order:

1. **Cache.** Clear your caching plugin, your host's cache and any CDN, then open the site in a private window.
2. **Allowed domains.** Every address the site runs on must be listed in the dashboard (for example both `example.com` and `www.example.com`, or a staging address).
3. **Published widget.** An unpublished widget is visible only to you.
4. **Optimization plugins.** Plugins that combine scripts into one file or delay them until the visitor interacts can stop the widget from loading. Exclude `app.partaknaweb.cz/widget.js` from combining and delaying; most such plugins have a list of exclusions.

= Does it work with optimization plugins? =

We tested two of them:

* **Autoptimize** (combining and deferring JavaScript): the widget works without any change.
* **LiteSpeed Cache**: with "JS Combine External and Inline" on, the widget script is combined away and the widget never appears. With "Load JS Deferred: Delayed" alone, it appears only after the visitor first moves the mouse, scrolls or presses a key. Adding `app.partaknaweb.cz/widget.js` to "JS Excludes" and to "JS Deferred / Delayed Excludes" (Page Optimization → Tuning) fixes both.

Other plugins with similar settings (combine external scripts, delay JavaScript) need the same exclusion.

= My site uses a Content Security Policy =

Allow `https://app.partaknaweb.cz` in `script-src` and `connect-src`, and `https://api.partaknaweb.cz` and `wss://api.partaknaweb.cz` in `connect-src`. Without `app.partaknaweb.cz` in `connect-src` the widget does not render at all; without `api.partaknaweb.cz` it loads and then stays silent.

= What does the "/ keyboard shortcut" setting do? =

Visitors can open the assistant by pressing `/`. If your site has its own search box or editor that uses that key, turn the shortcut off.

= Will the widget slow down my pages? =

The script loads with `async` in the footer, so it does not block your page from rendering.

= Who is responsible for visitor data? =

For the data of your visitors, you are the controller and the Parťák operator processes it for you. See the [privacy policy](https://partaknaweb.cz/privacy) and the [data processing agreement](https://partaknaweb.cz/dpa).

== External services ==

This plugin connects your site to the Parťák na web service, operated by AI Ajťák s.r.o. The service is the assistant: without it the plugin does nothing.

**What is loaded and when.** Once you save a widget ID, every public page of your site loads `https://app.partaknaweb.cz/widget.js`. That script loads the rest of the widget (scripts, stylesheet and fonts) from `app.partaknaweb.cz`. Nothing is loaded before a widget ID is saved, and nothing is loaded in the WordPress administration.

**Where the widget connects.** The widget talks to `api.partaknaweb.cz` over HTTPS and a secure WebSocket (WSS) to get its settings and to hold the conversation.

**What data is sent.**

* When the widget starts: your widget ID, the address and language of the page, the device type, a random visitor ID and session ID, and the browser's user agent (stored shortened to browser name and version). Page addresses are stored without the query string.
* When a visitor writes: the text of the messages. The conversation is answered by AI providers named in the subprocessor list (OpenAI as the main text provider, Google Gemini as a fallback).
* When a visitor uses voice (paid plans, after the browser grants microphone access): the audio is streamed through the Parťák server to the Google Gemini Live API. Raw audio is not stored; the text transcript is stored as part of the conversation.
* To answer about the page and act on it: the text, labels and links of the elements on the current page. Password fields, hidden fields and fields that look like payment or ID numbers are skipped.
* If the visitor leaves contact details, those details.
* Usage events (for example that the widget was opened) for the site owner's statistics. These are not sent when the visitor's browser signals Global Privacy Control or Do Not Track.
* If the widget hits an error: a technical error report (error message, stack trace, page address without the query string) to the error-monitoring service Sentry.

**What is stored in the visitor's browser.** The widget sets no cookies. It uses the browser's local storage for a random visitor ID (only after consent), the consent choice, an opt-out from measurement and short-lived "do not show again" flags, and session storage for the current conversation and session (expires after 30 minutes of inactivity).

**Terms and policies.**

* Terms of service: https://partaknaweb.cz/podminky
* Privacy policy: https://partaknaweb.cz/privacy
* Data processing agreement: https://partaknaweb.cz/dpa
* Subprocessors: https://partaknaweb.cz/subprocesori
* Cookies and browser storage: https://partaknaweb.cz/cookies

== Screenshots ==

1. Settings → Parťák na web: paste the widget ID or the whole embed code.
2. The assistant on a WordPress site.

== Changelog ==

= 1.0.0 =
* First release: settings page, widget on public pages, "/" shortcut switch, clean uninstall.

== Upgrade Notice ==

= 1.0.0 =
First release.
