=== Instant Conversion Analytics - User Analytics Directly Inside Emails Sent From Your Website ===
Contributors: riseofweb
Donate link: https://profiles.wordpress.org/riseofweb/
Tags: Contact Form 7, WooCommerce, Ninja Forms, WPForms, Analytics
Requires at least: 5.4
Tested up to: 7.1
Requires PHP: 5.6
Stable tag: 1.4.4
Text Domain: instant-conversion-analytics
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Adds visitor analytics — UTM, referral, device, journey — into your Contact Form 7, WooCommerce, WPForms and Ninja Forms emails.

== Description ==
Instantly append detailed visitor analytics—UTM, referral, device, journey—to all your Contact Form 7, Ninja Forms, WPForms, and WooCommerce emails.

Stop guessing where your leads and conversions come from. Get full context on each submission right in your notification email without ever leaving your inbox. Works like Google Analytics (or any other analytics tool) to give you instant insight and save you time.

= Plugin Features =

### Core Metrics
- **Referral Source & UTM** (e.g. utm_source, utm_medium, utm_campaign)
- **User Journey** (full page-path history on your site)
- **Time on Site** (total session duration)

### Device & Environment
- **Device Type** (mobile, desktop, tablet)
- **IP Address & (optional) Geolocation**
- **User‑Agent** (browser and OS details)

### Advanced / Opt-In
- **First-party session cookie** (auto-deleted on session end; GDPR/CCPA friendly)
- **Custom PHP Hook**:
  - `ica_report();` → plain‑text output
  - `ica_report('html');` → HTML output

= Plugin Compatibility =

This plugin works as an add-on currently with the following plugins:

- **Contact Form 7** (version >= 4.5)
- **Ninja Forms** (latest)
- **WPForms Lite** (latest)
- **WooCommerce** (version >= 3.4.2; HPOS compatible)
- **Caching Plugins** (WP Rocket, W3 Total Cache, etc.) — fully supported

== Installation and Configuration ==

1. **Upload** the `instant-conversion-analytics` folder to `/wp-content/plugins/`
2. **Activate** “Instant Conversion Analytics” via **Plugins → Installed Plugins**
3. **Configure** under **Settings → Instant Conversion Analytics**

== Frequently Asked Questions ==
= Q: Does it use cookies? =
A: Yes—a first-party session cookie that auto‑expires at session end.

= Q: Is it GDPR/CCPA compliant? =
A: You control compliance via your site’s privacy policy. See **Settings → Privacy Notes** for boilerplate text you can adapt.

= Q: Does it share data externally? =
A: No. All data is captured and appended locally; nothing is sent to third-party servers.

= Q: Will it slow down my site? =
A: No—the frontend load is a single asynchronous JS file (< 1 KB). In our PageSpeed tests, mobile score was 99 and desktop 100 with this plugin active.

= Q: Can I integrate with other form plugins? =
A: Yes—use the PHP hook `ica_report()` or `ica_report('html')`. More integrations (Gravity Forms, Elementor Forms) are coming soon.

= Q: What if the plugin errors? =
A: It uses an exception‑safe method. If analytics code fails, your emails still send as normal.

== Screenshots ==

1. Admin settings screen
2. Sample Contact Form 7 email with analytics block
3. Sample WooCommerce “New Order” email with analytics block

== Changelog ==

= 1.4.4 =
- Fixed: Added HPOS WooCommerce compatibility
- Confirmed Compatibility with WordPress version 7.1

= 1.4.3 =
- Fixed: Ensure the temporary WooCommerce meta data ica_cookie_value is deleted after emails are sent
- Confirmed Compatibility with WordPress version 6.7.1

= 1.4.2 =
- Confirmed Compatibility with WordPress version 6.1.1

= 1.4.1 =
- Improvement: Added prefixes to everything to avoid any possible issues with other plugins
- Improvement: Changed some of the outputted HTML and plain text for better formatting and readability
- Improvement: For WooCommerce plain text output this plugins output was moved to the bottom if the email
- Fix: When using an WooCommerce payment gateway that leaves the website the cookie would sometimes not be read.

= 1.4.0 =
- Added: Ninja Forms Compatibility
- Added: Option for full URL or URI page path
- Improvement: Removed the domain name from the user journey URLs in the cookie to reduce the number of characters to reduce the cookie size
- Improvement: Lowered the maximum cookie size to further avoid possible browser Bad Request response
- Fix: Disabled this plugin's output for WooCommerce "Resend new order notification" when sent from within the WordPress admin interface
- Note: If you are using a caching solution, after updating it is recommended that you clear the cache for the ica.min.js file

= 1.3.1 =
- Fixed a bug (introduced in 1.3.0) that caused HTML formated Contact Form 7 emails to show plain text analytics report

= 1.3.0 =
- Optimization of PHP scripts for speed
- Improved security by sanitizing the User-Agent Information
- Added links to support and reviews on the plugins page

= 1.2.2 =
- Fixed the plugin's HTML output formatting to account for the URL properly line wrap
- Improved GDPR/CCPA cookie statement example

= 1.2.1 =
- Tweaked the JavaScript enqueue to ensure it runs as early as possible
- Fixed typo in plain text referral source output (missing space)

= 1.2.0 =
- Added WPForms Integration
- Improved the plugin's HTML output formating and insured that it is not covering other email content
- Improved the plugin's plain text output formating
- Fixed Manual JavaScript Option Typo
- Changed WooCommerce implementation logic to include non-HTML new orders as well

= 1.1.0 =
- Added an uninstall hook to remove plugin options
- Added the Exception method to bypass any unforeseen PHP errors.
- Improved plugin activation hook options
- Improved JavaScript cookie security
- Improved output if the cookie can not be read
- Fixed Undefined index PHP Notices on the admin screen
- Fixed bug with displaying the timezone
- Fixed spaces showing in URLs
- Changed the .js file name to include .min for standard naming convention

= 1.0.0 =
- Initial release
