=== ARN Smart Visitor Intent ===
Contributors: arnsmart
Tags: visitor analytics, visitor intent, website intelligence, lead capture, ai insights
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Understand visitor intent, analyze website performance, and turn real visitor and Site Kit data into actionable intelligence.

== Description ==

**ARN Smart Visitor Intent transforms visitor responses and website performance data into clear, evidence-based intelligence.**

Go beyond basic contact forms and page-view counters. Discover why visitors came, which experiences encourage action, where engagement changes, and what your Analytics and Search Console data is telling you.

The plugin combines a lightweight visitor intent panel, flexible display rules, behavior-based triggers, response analytics, privacy tools, direct contact actions, and two dedicated intelligence systems:

* **Visitor Intelligence** analyzes intent, contact behavior, triggers, pages, time periods, and funnel performance.
* **Website Intelligence** reads authorized Google Analytics and Search Console data through Google Site Kit and compares the latest 28 days with the previous 28 days.

AI analysis is optional and uses your own provider credentials. When AI is unavailable or disabled, the built-in Visioix Engine continues producing deterministic, evidence-linked findings from the available data.

= 🧠 Two Intelligence Systems =

**Visitor Intelligence**

* Understand what visitors want before the first conversation begins
* Analyze intent distribution and response behavior
* Compare 7, 30, and 90-day periods
* Review trends, segments, contact activity, triggers, time, and funnel performance
* Identify high-performing and underperforming visitor journeys
* Generate aggregate insights without sending personal response data

**Website Intelligence**

* Connect through the official Google Site Kit plugin
* Read authorized Google Analytics and Search Console reports
* Compare the latest 28 days with the previous 28 days
* Monitor traffic, search, audience, engagement, content, and acquisition channels
* Detect increases, decreases, stable metrics, growth signals, and attention areas
* Match Analytics URLs to WordPress posts, pages, public content types, and WooCommerce products

= 🎯 Visitor Intent Capture =

* Lightweight sticky bottom bar and expandable response panel
* Fully editable visitor intent choices
* Optional name, email, company, and LinkedIn fields
* Editable titles, labels, placeholders, button text, and messages
* AJAX submission without page reload
* Success messaging and panel reset behavior
* Spam honeypot, nonce protection, validation, and sanitization

= ⚡ Smart Display Rules and Triggers =

Control exactly where, when, and for whom the visitor intent panel appears.

**Display rules**

* Homepage only or sitewide display
* Include or exclude selected pages
* Filter by public post type
* Show to logged-in or logged-out visitors
* Desktop and mobile visibility controls
* First-time and returning visitor targeting
* Global enable or disable control

**Behavior-based triggers**

* Instant display
* Delay by seconds
* Scroll-depth percentage
* Exit intent
* Number of page views
* Time spent on the website
* Shortcode activation
* JavaScript API activation

= 📊 Visitor Analytics =

* Dedicated Overview, Summary, Trends, Segments, Intent, Contact, Triggers, Time, and Funnel screens
* Views, panel opens, responses, dismissals, and contact activity
* Response, dismissal, contact, and conversion rates
* Intent distribution and period trends
* Trigger performance and funnel drop-off analysis
* Page and time-based behavior analysis
* First-time and returning visitor segments
* 7, 30, and 90-day reporting periods
* Weekly and monthly statistics

= 🌐 Website Intelligence with Google Site Kit =

Website Intelligence uses Google Site Kit as the authorized connection layer. The plugin does not ask you to create a second Google Analytics or Search Console connection.

**Website Overview**

* Users and new users
* Sessions and engaged sessions
* Views and views per session
* Engagement rate and bounce rate
* Average session duration
* Search clicks and impressions
* Click-through rate and average search position

**Traffic and search intelligence**

* Current-versus-previous period comparisons
* Absolute and percentage changes
* Increased, decreased, and stable metric groups
* Top queries and search pages
* Top content, countries, devices, and acquisition channels
* Reliable matching that avoids treating missing ranked rows as zero

**Content and product highlights**

* Most visited content
* Fastest-growing content
* Highest-engagement content
* Declining content and bounce-risk indicators
* WooCommerce product detection
* Most visited, fastest-growing, highest-engagement, and declining product highlights

= ✨ AI Insights and the Visioix Engine =

* Optional AI analysis using your own API credentials
* Configurable provider and model selection
* Evidence-linked diagnosis cards
* Diagnosis, interpretation, recommendation, confidence, and evidence sections
* Website performance, search, content, engagement, and session-quality analysis
* PMI assessment covering Plus, Minus, and Interesting findings
* Response summaries, topics, priority, follow-up guidance, status, and business meaning
* Aggregate Visitor Intelligence insights for selected reporting periods
* Data confidence and limited-sample warnings
* AI, Hybrid, and Visioix Engine source labels
* Deterministic fallback when AI is disabled, unavailable, times out, or returns invalid output
* Protection of the latest successful analysis during provider failures
* New-data detection and duplicate-analysis prevention
* Evidence validation that prevents unsupported or overly strong conclusions

= 🗂️ Intelligence History, Queue, and Usage =

* Period-based insight snapshots
* Historical analysis records
* Data and analysis-engine version tracking
* Duplicate snapshot prevention
* Background AI queue with retry controls
* New-data availability checks
* Input and output token tracking
* Daily and monthly AI usage reporting
* Provider and model usage distribution
* Estimated AI cost reporting

= 🔒 Privacy, Consent, and Credential Security =

* Optional consent checkbox
* Fully editable consent label and text
* WordPress policy page selector
* Modal, same-page, or new-tab policy opening
* Optional required consent before submission
* Only the consent acceptance status is stored
* Granular controls for data included in optional AI requests
* Aggregate visitor analysis without personal response data
* Authenticated AES-256-GCM protection for AI and SMTP credentials
* Masked credential fields that do not expose secrets in administration-page HTML
* Safe migration for previously stored credentials
* No plain-text credential fallback when secure encryption is unavailable
* Spreadsheet formula-injection protection for visitor-controlled CSV values

= ✉️ Notifications and SMTP =

* Email notifications for new responses
* Optional notifications only when contact information is provided
* Configurable recipient and subject
* WordPress Mail delivery
* Compatibility mode for an existing SMTP plugin
* Detection for common SMTP plugins
* Optional internal SMTP configuration
* SMTP connection and test-email tools
* Delivery logging and understandable error reporting

= 💬 Direct Contact Widget =

* Separate floating contact widget
* Call action
* Email action
* WhatsApp action
* Editable title, description, and action labels
* Desktop and mobile visibility controls
* Left or right positioning
* Contact widget opens and action clicks included in analytics

= 🗃️ Data Management =

* Review visitor responses inside WordPress
* Export responses and analytics fields to CSV
* Include consent status in exports
* Manual response cleanup
* Automatic response-retention cleanup
* Manual display-cache reset
* Automatic display-cache cleanup
* Safe uninstall cleanup support

= 🛡️ Built for WordPress =

* Uses WordPress capabilities, nonces, sanitization, validation, and escaping
* Responsive administration screens
* Compatibility improvements for Elementor and WordPress administration styles
* Cached website-data collection to reduce repeated report requests
* Clear connection, permission, unavailable, and limited-data states
* No separate Google credentials required beyond Google Site Kit

= Visioix Pro — Advanced Intelligence and Automation =

ARN Smart Visitor Intent is a complete and fully functional free plugin.

For organizations that need advanced form building, automation, integrations, deeper analysis, and professional intelligence workflows, a separate Pro version called Visioix Pro is also available.

Visioix Pro includes:

* Visual drag-and-drop form builder
* Unlimited fields, sections, and multi-step forms
* Conditional logic with IF/ELSE and AND/OR rules
* Branching visitor journeys and dynamic form fields
* Reusable templates and an advanced design studio
* Custom layouts, typography, colors, animations, and custom CSS
* CRM, Zapier, Make, Slack, Discord, webhook, and REST API integrations
* Secure field mapping, delivery logs, and retry management
* Event-based automation and conditional action workflows
* Automated emails, notifications, CRM synchronization, tagging, and follow-up actions
* Advanced period and trend analysis
* Custom date ranges and period comparisons
* Advanced visitor, traffic, content, intent, funnel, and lead segmentation
* Insight history, decision tracking, and outcome measurement
* Independent Website Intelligence analysis foundation
* Visitor Intelligence A/B testing
* Safe migration of existing Free settings, responses, analytics, and intelligence history
* Website Intelligence A/B Testing
* Forecasting and Early Warning
* Custom Reports
* Website Intelligence Pro
* Visitor Intelligence Pro
* Unified/Cross Intelligence
* Unified AI Action Plan
* Advanced Learning AI
* SWOT Analysis

[Explore Visioix Pro](https://arnsmart.com/visioix/)

== Installation ==

1. Install **ARN Smart Visitor Intent** from the WordPress plugin directory, or upload the plugin ZIP through **Plugins > Add New > Upload Plugin**.
2. Activate the plugin.
3. Open **Visitor Intent > Settings**.
4. Configure the visitor intent panel, display rules, triggers, privacy, notifications, and contact widget.
5. Review responses and behavior under **Visitor Analytics**.
6. Open **Visitor Intelligence** to configure optional AI analysis, history, queue, and usage reporting.
7. To use Website Intelligence, install and configure the official **Google Site Kit** plugin, then open the Website Intelligence connection screen.

== Frequently Asked Questions ==

= Is this a contact form plugin? =

Not primarily. Traditional contact forms begin by asking who the visitor is. ARN Smart Visitor Intent begins by asking why the visitor came, then optionally collects contact information and analyzes the behavior surrounding that response.

= What is the difference between Visitor Intelligence and Website Intelligence? =

Visitor Intelligence analyzes data collected by the visitor intent panel and contact widget, including intent, responses, triggers, contact behavior, and funnel performance. Website Intelligence analyzes authorized Google Analytics and Search Console reports obtained through Google Site Kit.

= Do I need Google Site Kit? =

Only for Website Intelligence. Visitor intent capture, Visitor Analytics, Visitor Intelligence, privacy tools, notifications, SMTP, CSV export, and the contact widget work independently. Website Intelligence requires the official Google Site Kit plugin to be installed, connected, and authorized for the relevant services.

= Does the plugin send my Google Analytics data to an external service? =

Website report data is read through your WordPress installation's authorized Google Site Kit connection. External AI processing is optional and only occurs when you configure your own AI provider credentials and request AI analysis. Privacy controls determine which supported data may be included.

= Is AI required? =

No. AI is optional. The built-in Visioix Engine provides deterministic comparisons, highlights, confidence indicators, and fallback diagnoses when an AI provider is not configured or cannot return a valid result.

= Does the plugin include an AI subscription or API credits? =

No. Optional AI features use your own provider credentials. The Cost & Usage screen helps you review token consumption and estimated costs associated with supported AI analysis.

= Can I display the panel only on selected pages or devices? =

Yes. You can use homepage, sitewide, include, exclude, post-type, login-state, device, and visit-status rules.

= Can I control when the panel appears? =

Yes. Available triggers include instant display, delay, scroll depth, exit intent, page views, time on site, shortcode, and JavaScript activation.

= Does it support GDPR or KVKK consent? =

The plugin provides configurable consent, policy-display, data-sharing, retention, and export tools. Site owners remain responsible for configuring and using these tools according to their legal obligations.

= Does it include WhatsApp? =

Yes. The separate Contact Widget supports Call, Email, and WhatsApp actions without requiring another floating contact plugin.

= Does internal SMTP replace my existing SMTP plugin? =

No. You can continue using WordPress Mail or a supported existing SMTP plugin. Internal SMTP is optional.

= Where are visitor responses stored? =

Responses are stored in WordPress. Authorized administrators can review them, export them as CSV, remove them manually, or configure automatic cleanup.

= Are AI and SMTP credentials protected? =

Yes. Credentials are protected with authenticated encryption when the required server encryption support is available. Secret values are not written back into administration-page HTML, and the plugin does not silently fall back to plain-text credential storage.

== Screenshots ==

1. 🎯 Visitor intent sticky bar and expandable response panel.
2. ⚙️ Intent content, appearance, display-rule, and trigger settings.
3. 📊 Visitor Analytics overview with key performance metrics.
4. 📈 Visitor trends, segments, intent, contact, trigger, time, and funnel analysis.
5. 🧠 Visitor Intelligence insights with evidence and confidence indicators.
6. 🌐 Website Intelligence overview powered by authorized Google Site Kit data.
7. 🔎 Google Analytics, Search Console, audience, channel, content, and product highlights.
8. ✨ Website AI diagnosis cards with PMI assessment and deterministic fallback.
9. 🗂️ Intelligence History, AI Queue, and Cost & Usage screens.
10. 🔒 Privacy, consent, AI data controls, and retention settings.
11. ✉️ Email notification, WordPress Mail, and SMTP settings.
12. 💬 Floating Call, Email, and WhatsApp contact widget.

== Changelog ==

= 2.0.0 =
* Major platform update transforming ARN Smart Visitor Intent into a complete Visitor and Website Intelligence solution.
* Added Visitor Intelligence dashboards for overview, summary, trends, segments, intent, contact behavior, triggers, time analysis, and funnel performance.
* Added aggregate Visitor Intelligence insights for 7, 30, and 90-day reporting periods.
* Added Website Intelligence through Google Site Kit with authorized Google Analytics and Search Console report access.
* Added current-versus-previous 28-day comparisons for traffic, search, audience, engagement, content, channel, and product performance.
* Added Website Overview metrics for users, new users, sessions, engaged sessions, views, views per session, engagement rate, bounce rate, session duration, clicks, impressions, CTR, and search position.
* Added deterministic traffic-change detection with increased, decreased, stable, and attention classifications.
* Added Search Highlights for top queries, search pages, countries, devices, content, and acquisition channels.
* Added WordPress content matching and WooCommerce Product Highlights for growth, visits, engagement, decline, and bounce-risk signals.
* Added evidence-linked Website AI diagnoses with interpretation, recommendation, confidence, and expandable supporting evidence.
* Added PMI assessment for Plus, Minus, and Interesting findings across overall website performance.
* Added Response Intelligence for summaries, topics, priority, follow-up guidance, status, and business meaning.
* Added AI and Visioix Engine hybrid processing with deterministic fallback for unavailable providers, timeouts, malformed responses, and rejected claims.
* Added data-confidence controls, sample-size warnings, evidence validation, and protection against unsupported conclusions.
* Added analysis history, snapshots, version tracking, duplicate prevention, new-data detection, and successful-result preservation.
* Added AI Queue controls with background processing and retry support.
* Added Cost & Usage reporting for tokens, providers, models, daily and monthly consumption, and estimated costs.
* Added configurable AI providers and models using website-owner supplied credentials.
* Added granular AI privacy controls and aggregate analysis that excludes personal visitor response data.
* Added Privacy & Consent tools with editable text, policy-page selection, opening method, required-consent enforcement, and exportable acceptance status.
* Added email notification controls, WordPress Mail support, external SMTP detection, optional internal SMTP, test email, and delivery logging.
* Added a separate floating Contact Widget with Call, Email, and WhatsApp actions plus interaction analytics.
* Expanded display rules for pages, post types, login state, devices, and first-time or returning visitors.
* Expanded behavioral triggers with delay, scroll depth, exit intent, page views, time on site, shortcode, and JavaScript activation.
* Added manual and automatic response cleanup, display-cache reset, and expanded CSV exports.
* Reorganized administration into dedicated Visitor Analytics, Visitor Intelligence, and Website Intelligence areas.
* Improved Google Site Kit connection handling, response normalization, caching, permission states, and invalid-report recovery.
* Improved responsive administration layouts, status indicators, evidence presentation, and compatibility with Elementor styles.
* Protected AI and SMTP credentials with authenticated AES-256-GCM encryption, masked fields, safe updates, and automatic migration.
* Prevented secret values from being exposed in administration-page HTML or stored as plain text when encryption is unavailable.
* Added spreadsheet formula-injection protection for visitor-controlled CSV values.
* Fixed response metadata being processed before a valid response record was created.
* Fixed missing evidence in deterministic Website Intelligence diagnoses.
* Removed unused callbacks, redundant calculations, obsolete code paths, and unreachable code while preserving WordPress hooks and extension points.
* Improved validation, sanitization, escaping, capability checks, nonce verification, error handling, packaging integrity, and upgrade stability.

= 1.0.0 =
* Initial release of ARN Smart Visitor Intent.
* Added the visitor intent sticky bar and response panel.
* Added configurable intent options and optional contact-information collection.
* Added response storage, basic analytics, email notifications, CSV export, and administration settings.

== Upgrade Notice ==

= 2.0.0 =
Major intelligence platform update. Back up your WordPress database before updating, then review the new Visitor Intelligence, Website Intelligence, privacy, AI, and SMTP settings after activation.
