=== CitCom. User Insights === Contributors: citcom Tags: analytics, user-tracking, woocommerce, crm, visitor-tracking Requires at least: 6.0 Tested up to: 6.7 Requires PHP: 7.4 Stable tag: 2.1.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Comprehensive user behaviour analytics and CRM dashboard for WordPress and WooCommerce. == Description == CitCom. User Insights gives you a deep, sales-focused view of every person who visits your site — whether they are a logged-in customer, a guest who has never registered, or a WooCommerce buyer identified only by their billing email. **Core Features (Free)** * **Page visit & session tracking** – records every page visit and groups them into sessions with configurable inactivity timeout. * **Unified user/guest list** – single admin list table showing registered users and anonymous visitors side-by-side with sortable columns (visits, sessions, last seen, device, etc.). * **Individual user profiles** – tabbed profile page with Activity, WooCommerce*, Wishlist*, and Notes* tabs. * **Guest cookie management** – assigns a persistent browser cookie to anonymous visitors. On checkout or login the guest record is merged with the WooCommerce customer record. * **Email deduplication** – historical guest sessions are transferred to the user account on registration or when a matching billing email is detected at checkout. * **Device, browser & OS detection** – lightweight built-in parser; no third-party service required. * **WPConsent integration** – tracking is gated behind statistics consent when Cookies Banner & Privacy Suite is active. **Pro Features** * WooCommerce stats on user profiles (lifetime value, order count, average order). * WPC Smart Wishlist integration (wishlisted products per user, wishlisters per product). * CRM Notes on user profiles (add, edit, delete). * Product Insights (per-product analytics, sorted viewer/purchaser lists, wishlister column). * Advanced settings (role exclusions, data retention, IP anonymisation, Danger Zone). * Guest tracking customisation. [Upgrade to Pro](https://citcom.co.uk/plugins/citcom-user-insights/) == Installation == 1. Upload the `citcom-user-insights` folder to `/wp-content/plugins/` or install via the WordPress **Plugins → Add New** screen. 2. Activate the plugin through the **Plugins** menu. 3. Navigate to **User Insights** in the WordPress admin sidebar. 4. Optionally configure tracking preferences under **User Insights → Settings**. No database changes are needed — the plugin creates its own tables automatically on activation. == Frequently Asked Questions == = Does it work without WooCommerce? = Yes. WooCommerce is optional. Without it, the WooCommerce stats tab is hidden on user profiles and the Product Insights section is unavailable. = Does tracking require user consent? = If the **Cookies Banner & Privacy Suite** (WPConsent) plugin is active, tracking is automatically gated behind the visitor's statistics consent. Without WPConsent, all visits are tracked. = Will it slow my site down? = Tracking is performed via a lightweight, non-blocking AJAX request. The visitor-facing script is under 3 kB (minified). Database writes are single-row inserts on a dedicated table with proper indexes. = What data is stored? = Page URL, referrer, session ID, device/browser/OS string, IP address (optionally anonymised in Pro), and a cookie identifier for guests. No data is sent externally except through Freemius (licence management) on Pro, which has its own privacy policy at freemius.com/privacy. = Can I delete all data when uninstalling? = Yes. Enable **Delete all data on uninstall** in Settings → Advanced (Pro) before deactivating and deleting the plugin. Otherwise, `uninstall.php` leaves data intact. = Is it GDPR compliant? = The plugin is designed to be GDPR-ready: WPConsent integration for consent gating, optional IP anonymisation (Pro), optional full data deletion on uninstall (Pro). Please review what you track and update your privacy policy accordingly. == Screenshots == 1. User insights list — combined registered users and guests with sortable columns. 2. User profile — Activity tab showing session timeline and page visits. 3. User profile — WooCommerce tab with lifetime value, order count, and order list (Pro). 4. User profile — Wishlist tab showing wishlisted products (Pro). 5. Product Insights list with Wishlisted column (Pro). 6. Product profile with viewer and purchaser tabs (Pro). 7. Settings page. == Changelog == = 2.1.1 = * Fixed: Moved uninstall logic from uninstall.php into Freemius after_uninstall hook. Removes uninstall.php per Freemius deployment requirements. = 2.1.0 = * Fixed: Freemius SDK conflict guard — bundled SDK only loaded when no other plugin has already initialised Freemius, preventing "constant already defined" PHP warnings. * Fixed: Set is_premium=true and has_premium_version=false so Freemius treats the plugin as a single-ZIP freemium build; removes the erroneous prompt to download a separate premium version. * Added: WP_CUI_PRO_TESTING dev override in CUI_Features — add define('WP_CUI_PRO_TESTING', true) to wp-config.php to force Pro mode locally without a Freemius account. * Added: readme.txt for WordPress.org directory submission. * Added: GitHub Actions workflow for automated Freemius deployments on version tag push. = 2.0.1 = * Added: Wishlist tab on per-product profile page listing every user who wishlisted that product. * Added: Wishlisted stat card on per-product profile. * Added: Wishlisted column on the product insights list table (sortable). * Added: Freemius integration — Lite/Pro freemium model with 14-day no-card trial. = 1.1.1 = * Added: Product Insights feature — per-product analytics list and profile pages. * Added: Viewer and Purchaser tabs on product profiles. * Added: Category filter and Popular quick-filter on product list. * Added: Branded Insights button injected into native WooCommerce product list column. = 1.1.0 = * Added: WPConsent integration for statistics consent gating. * Added: Frontend tracker listens for wpconsent_consent_processed event. * Changed: Tracker script always enqueued; consent gate enforced server-side. = 1.0.0 = * Initial release. == Upgrade Notice == = 2.1.1 = Maintenance release. No user-facing changes. = 2.1.0 = Fixes PHP warnings when another Freemius-based plugin is active, and resolves the incorrect "download Pro version" prompt for users with an active licence. = 2.0.1 = Adds Wishlisted column sorting on the product list and introduces the Lite/Pro freemium model. Existing installs retain full access to features available in the free tier.