=== Quantely Analytics ===
Contributors: erravi
Tags: cookieless analytics, visitor tracking, statistics, conversion, traffic
Requires at least: 6.2
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

Lightweight web analytics built entirely inside WordPress.

== Description ==

A lightweight web analytics plugin built entirely inside WordPress.  Quantely Analytics assembles individually captured pageviews and events into sessions and visitors, and extracts meaningful traffic and engagement metrics from these.

Quantely is built for site owners who want robust website statistics, traceable to raw activity, and hassle-free to set up.

== Key Features ==

* Statistics that matter: sessions, engagement, visitors
* Page statistics with pageviews, active time, entry and exit rates, sessions, and visitors
* Journey analysis based on qualified session paths
* Automated-session classification with transparent scores and reasons
* Breakdowns by device, browser, channel, actor, and month
* Rolling 90-day retention for Pages and Journeys, with a configurable Maximum journeys cap
* Quantely Analytics can be extended with <a href="https://www.erravi.com/quantely/quantely-insights/" target="_blank" rel="noopener">Quantely Insights</a> for events, conversions, and deeper analysis.
* Requires Quantely Activity for pageview and event collection, advanced exclusions, bot filtering, and optional visitor tracking
* Privacy-first by design: all analytics data is processed and stored locally, with no external tracking or data sharing
* Turnkey setup: install, activate, and start collecting statistics without tracking codes, accounts, or complex configuration
* Fast and lightweight: optimized database queries, no external dependencies, and reliable tracking with server-side caching

Quantely Analytics itself does not use JavaScript tracking, set cookies, or communicate with external analytics services. It processes data locally from Quantely Activity. Data collection, including optional visitor identification, is handled by Quantely Activity and depends on its configuration. 

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/quantely-analytics` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the Plugins screen.
3. Make sure Quantely Activity is installed and active.
4. Open the Quantely menu in the WordPress admin to view the Dashboard.

== Frequently Asked Questions ==

= Does this plugin work without Quantely Activity? =

No. Quantely Analytics depends on Quantely Activity for activity collection. Without Quantely Activity, Quantely Analytics cannot record or process activity data.

= Does Quantely Analytics use cookies? =

Quantely Analytics itself does not use cookies. Optional visitor identification is handled by Quantely Activity and depends on its configuration.

= Does Quantely Analytics use JavaScript tracking? =

No. Quantely Analytics processes activity data server-side from Quantely Activity. It does not add its own JavaScript tracking layer.

= Does this plugin send data to external services? =

No. Quantely Analytics does not send analytics data to external services.

= Why do I not see visitor statistics? =

Visitor statistics require visitor identification in Quantely Activity. This can be based on a visitor cookie or on the configured cookieless fallback. If both are disabled, Quantely Analytics uses actor-key grouping for visitor metrics. These visitor metrics remain available, but should be treated as weak and may closely resemble session metrics.

= What kind of statistics does Quantely Analytics provide? =

Quantely Analytics provides sessions, visitors, engagement, page statistics, journeys, device and channel breakdowns, monthly traffic development, and diagnostic insight into how statistics are constructed.


== Screenshots ==

1. Dashboard overview
2. Page statistics
3. Journeys
4. Analytics history
5. Diagnostics
6. Sessions & Visitors

== Changelog ==

= 2.0.0 =
* Major Analytics release with dedicated Pages and Journeys reports.
* Added rolling 90-day page and journey archives with server-side filtering, sorting, and pagination.
* Added transparent automated-session classification so high-confidence automated traffic is excluded while suspected sessions remain available for review.
* Moved Pages and Journeys into their own Quantely submenu screens and renamed the main Analytics page to Dashboard.
* Added page engagement, entry and exit metrics, qualified journey patterns, actor filtering, and materialization diagnostics.

= 1.1.93 =
* Passed report query replacements as explicit `wpdb::prepare()` arguments so WordPress Coding Standards can verify every placeholder count.

= 1.1.92 =
* Prepared dynamic table and column identifiers with WordPress `%i` placeholders.
* Replaced dynamic archive-cleanup placeholder lists with explicit prepared deletions.
* Reworked Pages and Journeys report filters as fixed prepared queries while preserving their filter and sorting behaviour.
* Raised the minimum supported WordPress version to 6.2 for identifier-placeholder support.

= 1.1.91 =
* Fixed the Visitor actor filter on the Pages and Journeys reports.
* Visitor now queries the stored `visitor` actor bucket instead of actorless rows.

= 1.1.9 =
* Added classifier version 5 for shorter repeated two-page and three-page cycle families.
* Treats strict two-page cycles from four steps and strict three-page cycles from six steps as family candidates while keeping isolated occurrences included as Suspected.
* Keeps the existing 10-step two-page and 12-step three-page standalone thresholds unchanged.
* Keeps same-identity repeat classification aligned with Quantely Activity at six and nine steps.
* Classifies five corroborated or seven uniform family occurrences when concentrated within two hours.
* Allows repeated families outside a two-hour cluster to become Automated at seven corroborated or ten uniform sessions across the retained window.
* Uses timing concentration as supporting evidence rather than an absolute family requirement.
* Reclassifies retained 90-day archives and rebuilds Pages and Journeys from the refined verdicts.

= 1.1.8 =
* Added classifier version 4 for concentrated two-page cycle families across retained sessions.
* Keeps isolated 6-9-step two-page cycles included as Suspected.
* Classifies a short two-page cycle family as Automated when at least five sessions occur within two hours and differ by sequence length, starting side, or stable identity.
* Requires seven sessions within two hours when every short cycle occurrence has the same shape.
* Keeps the existing 10-step standalone threshold and visitor-scoped repeat rule unchanged.
* Reclassifies retained 90-day archives and rebuilds Pages and Journeys from the refined verdicts.

= 1.1.7 =
* Renamed the Analytics admin page to Dashboard while keeping Quantely Analytics as the plugin name.
* Renamed the Assembly interface to Traffic.
* Moved Journeys and Pages from Dashboard tabs to separate submenu pages.
* Aligned path-cycle classification with Quantely Activity 1.2.5 through classifier version 3.
* Keeps isolated 6-step two-page and 9-step three-page cycles included as Suspected.
* Classifies standalone two-page cycles from 10 steps and standalone three-page cycles from 12 steps as Automated.
* Classifies shorter cycles as Automated only when the same visitor-scoped identity repeats the cycle after a genuine 30-minute session break within 24 hours.
* Keeps timing regularity as supporting evidence rather than a standalone reason for exclusion.
* Reclassifies retained 90-day archives and rebuilds Pages and Journeys from the corrected verdicts.

= 1.1.6 =
* Kept the v1.1.4 Assembly interface and Show / hide controls.
* Recognizes deterministic two- and three-page journey cycles.
* Groups different cycle lengths and starting positions into one actor-level cycle family.
* Treats deterministic path structure as conclusive without using recorded active time as a veto.
* Reclassifies the retained 90-day archives and rebuilds journey patterns through classifier version 2.

= 1.1.4 =
* Added non-destructive automated-session classification after Assembly.
* Added a separate Automated sessions option to Assembly's Show / hide control.
* Shows classifier scores and reasons on automated and suspected session rows.
* Excludes only high-confidence automated sessions from Pages, Journeys, Overview, and newly materialized History aggregates.
* Keeps suspected sessions included while retaining their classification for review.
* Applies the same classifier to retained 90-day Page and Journey archives and rebuilds journey patterns without confirmed automated traffic.

= 1.1.3 =
* Stabilized session and visitor archive identity across rolling source-window rebuilds.
* Replaced the complete still-rebuildable report window instead of refreshing archive rows only by generated session key.
* Added a conservative one-time cleanup for duplicate retained journeys with the same actor, exact timestamps, and canonical path hash.
* Removed Page archive rows belonging to the duplicate journey copies.
* Rebuilt journey patterns and Overview report sources from the repaired archives.

= 1.1.2 =
* Added a Devices overview table showing device and browser combinations with session counts.
* Retained browser and entry-referrer dimensions in the rolling 90-day qualified-session report archive.
* Made the existing Channels and Top 10 referrers overview tables use that 90-day archive when available.
* Hid the Quantely Insights Overview promotion while retaining its implementation for a later release.

= 1.1.1 =
* Removed legacy Insights event data from retained Analytics journeys.
* Rebuilt journey hashes from page-only paths.
* Collapsed consecutive identical pages in journeys while preserving returns after another page.
* Rebuilt the configured Maximum journeys patterns from the normalized 90-day archive.
* Kept Pages, dashboard, History, and canonical session pageview counts unchanged.

= 1.1.0 =
* Added Pages and Journeys as native Analytics reports.
* Added Analytics-owned 90-day page and journey archives.
* Preserved Maximum journeys as an additional journey-pattern retention limit.
* Added SQL filtering, sorting, and pagination for Pages and Journeys.
* Added report materialization diagnostics and protected source-detail purging until Pages and Journeys are materialized.
* Removed Top 10 pages from the Analytics Overview.

= 1.0.7 =
* Fixed an issue where Activity rows could fail to materialize into Analytics sessions on sites with older database indexes.
* Added a schema repair step for Analytics session and pageview indexes.
* Improved Activity to Analytics rebuild diagnostics, including import yield, pageview candidates and insert failure counters.
* Improved dashboard aggregate rebuild reliability after Activity data has been imported.

= 1.0.6 =
* Added a dismiss option for the Quantely Insights promotion card on the Overview dashboard.
* Added the native WordPress plugin dependency header for Quantely Activity.
* Cleaned up the Quantely Activity dependency wording in the readme.

= 1.0.5 =
* Added Quantely Insights extension visibility in Overview, Diagnostics, and Data settings.

= 1.0.4 =
* Fixed Analytics overview Top 10 pages so it uses core session pageview data and does not depend on the Insights page archive.
* Added the post-rebuild action hook used by extensions after core session/pageview rebuilds complete.
* Improved terminology and notifications.

= 1.0.3 =
* Renamed Dashboard to Analytics.
* Renamed Sessions to Assembly.

= 1.0.2 =
* Tested with WordPress 7.0.

= 1.0.1 =
* Initial public release

== Privacy ==

Quantely Analytics processes analytics data locally within your WordPress installation.

Data stored may include:

* Pageviews
* Sessions
* Page statistics retained for the rolling last 90 days
* Journey paths retained for the rolling last 90 days, subject to the configured Maximum journeys limit
* Visitor identifiers, depending on Quantely Activity configuration
* Aggregated traffic statistics
* Diagnostic information about how analytics data is processed

Quantely Analytics does not send analytics data to external services.

Quantely Analytics depends on Quantely Activity for activity collection and optional visitor identification.

== Dependencies ==

This plugin requires Quantely Activity. Without Quantely Activity, Quantely Analytics cannot record or process activity data.
