=== Kayode Chat Lead Capture ===
Contributors: damilolakayode
Tags: chat, leads, contact, whatsapp, marketing
Requires at least: 5.0
Tested up to: 7.1
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Capture customer names, emails, and messages before they start a chat on WhatsApp. Includes a local database and analytics dashboard.

== Description ==

Kayode Chat Lead Capture is a professional marketing tool designed to help business owners stop losing potential customers. While standard click-to-chat buttons send users away from your site instantly, this plugin acts as a lead-generation gatekeeper.

= How it works =
When a visitor clicks the floating WhatsApp button, a professional modal appears asking for their Name, Email, and Message. Once submitted, the data is saved locally to your WordPress database. The plugin then automatically pre-fills the visitor's message into WhatsApp and redirects them to the chat.

= Features =
*   **Lead Capture:** Save contact details to a custom database table.
*   **Smart Pre-fill:** Automatically types the customer's message into WhatsApp.
*   **Analytics:** View total clicks and leads captured in your dashboard.
*   **GDPR Ready:** Includes a mandatory consent checkbox for privacy compliance.
*   **CSV Export:** Download your leads list for email marketing.

== Installation ==

1. Upload the `kayode-chat-lead-capture` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to the 'Kayode Chat' menu in your sidebar to configure your settings.

== External services ==

This plugin relies on the official WhatsApp API to facilitate communication between the website visitor and the site owner.

* **Service:** WhatsApp Public API
* **Usage:** Redirects the user to a WhatsApp chat window with a pre-filled message.
* **Data sent:** The visitor's name and the message they typed in the lead form are passed as URL parameters to the WhatsApp API.
* **Service Link:** https://api.whatsapp.com
* **Terms of Service:** https://www.whatsapp.com/legal/
== Pro Version ==

=== Take Your Website Chat From Basic Communication to Lead Generation

Kayode Chat Lead Capture Free gives your website a simple way to connect with visitors and start conversations.

==Kayode Chat Lead Capture Pro== takes the experience further by turning visitor conversations into a complete lead-generation and customer follow-up system inside WordPress.

With Pro, you can use AI to answer visitor questions, capture contact information, organize leads, measure conversions, and connect qualified visitors with your team through WhatsApp.

=== Why Upgrade to Pro?

The Free version is designed to help you get started with visitor communication.

The Pro version is designed for businesses that want to **capture, manage, qualify, and convert website visitors into leads.**

Pro adds:

* AI-powered conversations using Google Gemini.
* Custom AI assistant name, status, image, welcome message, and personality.
* AI conversation context during the visitor's current interaction.
* Lead capture for name, WhatsApp/phone number, email address, and inquiry.
* Automatic extraction of contact information from visitor conversations when available.
* Lead scoring from 0 to 100.
* Built-in CRM-style Leads List inside WordPress.
* Search leads by name, email, or phone number.
* Filter leads by New, Contacted, Qualified, Converted, or Lost status.
* View lead contact information and conversation history.
* View lead source page, device, browser, and available country information.
* Manually create leads.
* Bulk delete leads.
* Export leads to CSV.
* Advanced Analytics dashboard.
* Visitor, conversation, lead, and WhatsApp click metrics.
* Conversion Rate and AI Resolution metrics.
* Daily performance reporting.
* Conversion Funnel showing Visitors, Conversations, Leads, and WhatsApp Clicks.
* Traffic Source reporting for Direct, Search, Social, and Referral traffic.
* Mobile and Desktop device reporting.
* Top-performing pages reporting.
* Active user and new lead activity metrics.
* Analytics report export.
* WhatsApp human handoff.
* Pre-filled WhatsApp messages for easier follow-up.
* Multi-agent/team support.
* Allow visitors to select an active team member before WhatsApp handoff.
* Configurable team member names, roles, and WhatsApp numbers.
* Option to show or hide the "Talk to a Human on WhatsApp" button.
* Pro license activation and verification.

=== How Kayode Chat Lead Capture Pro Works

The Pro version connects the visitor journey into one workflow:

**Visitor → AI Conversation → Lead Capture → Lead Scoring → CRM → WhatsApp → Analytics**

1. **A visitor opens the chat**

   The visitor clicks the floating chat button on your WordPress website.

2. **The visitor starts a conversation**

   If AI Chatbot is enabled, the visitor can ask questions and receive responses from Google Gemini.

3. **The conversation collects useful information**

   The visitor can provide their name, phone number, email address, and inquiry through the conversation or lead form.

4. **The lead is captured**

   Pro saves the available contact information, inquiry, conversation summary, source information, and other available attribution data in your WordPress database.

5. **The lead receives a score**

   Pro calculates a lead score based on the information available for the lead, helping you identify more complete and potentially valuable inquiries.

6. **The lead appears in your CRM**

   Administrators can review leads from the WordPress dashboard, search and filter records, view conversation history, manage lead status, and export lead data.

7. **The visitor can be connected to WhatsApp**

   When a visitor wants to speak with a real person, Pro can hand the conversation over to WhatsApp with a pre-filled message.

8. **Teams can receive leads**

   With Multi-Agent Mode enabled, visitors can select an active team member before the WhatsApp handoff.

9. **You can measure the entire journey**

   The Analytics dashboard helps you understand how visitors move through your website:

   **Visitors → Conversations → Leads → WhatsApp Clicks**

== Free vs Pro ==

**Free**

A simple way to add visitor communication and WhatsApp functionality to your WordPress website.

**Pro**

A complete AI-powered lead capture and conversion system that combines:

**AI Chat + Lead Capture + CRM + Lead Scoring + Analytics + WhatsApp + Multi-Agent Handoff**

The Pro version is built for businesses that want more than just a chat button. It helps turn website conversations into organized leads that can be followed up and measured.

== Get Kayode Chat Lead Capture Pro ==

Unlock the complete lead-generation features and take your WordPress website's visitor communication to the next level.

== Get Kayode Chat Lead Capture Pro:==

https://wpwhatsappbutton.gumroad.com/l/kayode-chat-pro

**Note:** AI functionality requires a Google Gemini API key. Google Gemini API usage is subject to Google's applicable API limits, availability, and pricing.

== Changelog ==
= 1.0.1 =
* Fixed analytics counter displaying blank when there are no clicks.
* Other minor improvements and bug fixes.

= 1.0.2 =
* Fixed plugin loading issue on some WordPress installations.
* Improved compatibility and stability.

= 1.0.3 =
* Fixed compatibility issues on some WordPress installations.
* Improved plugin loading and stability.
* Minor bug fixes and code improvements.

= 1.0.4 =
* updates on upgrade buton

= 1.0.5 =
* updates on upgrade buton

= 1.0.6 =
updates on upgrade buton

= 1.0.7 =
* Added information about Kayode Chat Lead Capture Pro and its advanced features.
* Added a Pro upgrade link for users who want AI chat, lead management, advanced analytics, WhatsApp handoff, and multi-agent features.
* Improved plugin documentation and Pro upgrade information.
== Screenshots ==

1. Floating WhatsApp button on your website.
2. Lead capture form for collecting visitor information.
3. WhatsApp handoff with a pre-filled visitor message.
4. Analytics dashboard showing visitor and lead activity.
5. Plugin settings for configuring the chat experience.
6. Lead List showing captured visitor information.

7. Pro: AI-powered chat assistant for engaging website visitors.
8. Pro: CRM-style Lead List for managing captured leads.
9. Pro: Lead scoring helps organize and qualify captured leads.
10. Pro: Advanced Analytics dashboard for tracking visitor activity and conversions.
11. Pro: Conversion Funnel showing the visitor journey from visitors to WhatsApp clicks.
12. Pro: Multi-Agent Mode allowing visitors to select a team member.