Nexu Stats — Product Capabilities (English reference for support / chat / site copy)
===================================================================================

Nexu Stats (plugin header: “Nexu Stats: Visitor Traffic & Real-Time Statistics Plugin for WordPress”) is a self-hosted analytics plugin for WordPress. It records visitor activity in your own database, shows dashboards and real-time views in wp-admin, and can summarize traffic with optional AI-generated reports sent by email. It is designed to add visitor intelligence without shipping your analytics data to a third-party SaaS.

Licensing and admin hub
-----------------------
The plugin integrates with the shared NEXU WP ecosystem: a valid license is activated under NEXU WP → Licenses. Until the license is active, frontend tracking, background crons, REST/AJAX data collection, and the full dashboard stay off; the NexuStats menu remains so the store owner can complete activation. Product news and hub navigation use the same NEXU WP parent menu pattern as other Nexu products. The official product page is: https://nexuwp.com/product/real-time-ai-analytics-statistics-plugin-for-wordpress/

What gets stored
----------------
All analytics live in the WordPress database. Core tables include: visits (sessions with geo, device, browser, referrer, bounce and duration fields), pageviews (per-page views with time-on-page, scroll depth, optional post linkage), AI report history (stored analyses and email flags), lightweight bot statistics (separate from human metrics), and a legacy-style settings table created at install. Data can be pruned automatically based on a configurable retention period.

How tracking works
------------------
There are two tracking modes. JavaScript tracking (default) loads a small async script on the front of the site. It captures page URL and title, referrer, visitor and session identifiers, user agent, screen resolution, and supports richer signals such as time on page and scroll depth. PHP server-side tracking is an alternative for environments where JavaScript is unavailable or heavily cached; it runs on page load via server logic, uses defaults where the browser cannot supply data (for example screen size), and can set a short-lived session cookie for continuity. Administrators may exclude their own visits, all logged-in users, and specific IP ranges. Optional IP anonymization and a GDPR-oriented mode help align collection with privacy expectations.

Bots and “human” traffic
------------------------
A bot detection layer classifies suspicious and known automated traffic. Confirmed bots are logged in a dedicated bot stats table so they do not distort human dashboards. Very short sessions can be treated as low-trust or bot-like for segmentation, keeping headline metrics closer to real engagement.

Admin interface — main navigation
-----------------------------------
The primary screen is under NEXU WP → NexuStats (capability: administrators). It uses a tabbed layout with a fixed navigation rail.

Overview — High-level dashboard: KPIs, trends, and summary visuals for the selected date range (with shared date-filter components used across tabs).

Real-Time — Live picture of current activity (recent visitors, active flavour of stats), refreshed for operators who need “right now” insight.

Audience — Three sub-areas: Visitor Behavior (paths, sessions, visitor-centric metrics), Technology (devices, OS, browsers, screen-related breakdowns), and Locations (geographic distribution from resolved visitor data).

Content & Traffic — Two sub-areas: Pages & Content (which URLs and content perform, time on page, engagement proxies), and Traffic Sources (referrers and channel-style breakdowns).

Bot Traffic — Reporting focused on crawlers and automated visits using the bot statistics store.

AI Analysis — Configuration for connecting an external AI API, language and recipient options, toggles for scheduled daily / weekly / monthly reports, and a browsable history of generated reports with actions such as resend or delete where implemented. Supported provider families in settings include OpenAI, Anthropic (Claude), Google (Gemini family), Mistral, Grok, DeepSeek, Cohere, and Perplexity; the admin can test the connection before relying on automation.

Settings — General behaviour: tracking method, data retention, exclusions, privacy toggles, performance-related options (including caching behaviour where enabled), AI delivery schedules and times, export permissions, and other maintenance-oriented switches. A Debug tab (administrators) exposes diagnostics, logging, database health tooling, cron reschedule helpers, optional test jobs for scheduled reports, and the ability to reset analytics data when a full purge is required.

Welcome flow
------------
On first use, the plugin can direct new installers to a welcome screen that explains major features before normal operation.

APIs and AJAX (conceptual)
--------------------------
Anonymous front-end hits are accepted through WordPress AJAX actions (and a REST route namespace for tracked posts) protected by nonces and rate limiting as implemented. Authenticated admin AJAX powers the interactive dashboard: loading statistics slices, saving settings, realtime polling, CSV export, AI report generation and retrieval, session journey and visitor journey lookups, managing active session logs, database checks and repairs, cron operations, and AI connection tests. These administrative endpoints require appropriate capability checks and nonces.

Scheduled automation
--------------------
WordPress cron drives separate “generate” and “send” phases for daily, weekly, and monthly AI reports so heavy generation does not block email delivery. User-configurable clock times shift those schedules. A daily cleanup job can remove outdated raw data according to retention policy.

Email
-----
HTML email templates exist for daily, weekly, monthly, and custom report mailings. The site’s configured AI and mail environment determine whether automated insights reach the inbox.

Internationalization and layout
-------------------------------
The UI strings use the nexustats text domain; Persian locale assets exist in the languages directory. The settings wrapper adds RTL styling hooks when the site is RTL.

Positioning summary for customer-facing copy
--------------------------------------------
In one sentence: Nexu Stats gives WordPress site owners privacy-friendly, self-hosted visitor analytics with real-time views, deep audience and content reporting, bot separation, optional PHP fallback tracking, and an optional AI layer to turn raw traffic into written summaries and recurring email reports — gated by Nexu WP licensing like other products in the same family.

End of reference.
