=== CausalFunnel A/B Testing ===
Contributors: causalfunnel
Tags: a/b testing, split testing, conversion optimization, experiments, woocommerce
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 2.3.4
Requires PHP: 7.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Create and measure A/B tests for pages, posts, buttons, headings, URLs, and WooCommerce products.

== Description ==

CausalFunnel A/B Testing helps site owners create, launch, and evaluate conversion experiments from the WordPress dashboard.

Features include:

* Page, post, URL, headline, button, element, and WooCommerce product tests.
* Audience targeting by device, browser, country, referrer, UTM parameters, and time.
* Conversion goals and experiment result reporting.
* Optional analytics, heatmap, and customer-journey integrations.
* Optional AI-assisted test suggestions.

Analytics Dashboard and Website Tracking are enabled by default so experiments work immediately. Site owners can disable either feature in **CF Platform → Account Info** after reviewing the details below.

== External services ==

This plugin connects to CausalFunnel services when the relevant feature is enabled. All external requests are consent-gated.

* `apps.causalfunnels.com` — experiment configuration, conversion metrics, and optional Google Analytics/Tag Manager integration. Sends test configuration, variant assignments, page URLs, pseudonymous session/device identifiers, event type, device type, and optional conversion value.
* `server.causalfunnels.com` — analytics, heatmaps, customer-journey reports, geolocation, and page audits. Sends site identifier, page URL, date range, or visitor IP (for geolocation). Requests occur when an administrator opens a report or starts an audit.
* `agent.causalfunnels.com` — AI-powered test suggestions and audits. Sends product names, prices, descriptions, categories, stock status, site identifier, and business context. Requires analytics consent and occurs only when an administrator starts the AI feature.
* `www.scripts.causalfunnel.com` — serves the consent-gated frontend A/B-testing script.

Admin JavaScript and CSS dependencies are bundled locally.

Review the [CausalFunnel privacy policy](https://www.causalfunnel.com/privacy) before enabling external integrations. Site owners are responsible for obtaining any consent required by their jurisdiction. For data deletion requests, contact [CausalFunnel support](https://www.causalfunnel.com/).

== Privacy and cookies ==

The following cookies are created only after consent is enabled:

* `cf_prevDeviceId` and `cf_prevBrowserId` (up to 365 days): Pseudonymous browser/device identifiers.
* `cf_visitor_id` (up to 365 days): Session identifier for tracking.
* `cf_prod_test_*` (up to 30 days): A/B test variant assignments for returning visitors.
* `cf_view_*` (up to 1 hour): Prevents duplicate pageview recording on reload.

Disable data collection in **Account Info** to stop new tracking and cookie creation. Previously issued cookies expire naturally or can be cleared by the site owner. Existing data stored by CausalFunnel services is governed by the service's retention and deletion policies.

== Installation ==

1. Upload the `causalfunnel-datascience` folder to `/wp-content/plugins/`, or install the ZIP from the WordPress Plugins screen.
2. Activate the plugin.
3. Open **CF Platform → Account Info**.
4. Review the privacy and external-service information.
5. Disable any feature your site does not require.
6. Create and launch an A/B test from **CF Platform → A/B Tests**.

WooCommerce product tests require WooCommerce. Elementor deployment features require Elementor.

== Frequently Asked Questions ==

= Does this plugin work without WooCommerce? =
Yes. WooCommerce is only required for product A/B tests. All other test types work independently.

= Can I disable data collection? =
Yes. Analytics Dashboard and Website Tracking can be disabled at any time in **CF Platform → Account Info**.

= Is this plugin compatible with caching plugins? =
Yes. The A/B testing script uses client-side variant assignment, so it works with page-level caching.

= How do I delete data collected by CausalFunnel? =
Contact [CausalFunnel support](https://www.causalfunnel.com/) for remote data deletion requests. Disable data collection in Account Info to stop new data from being sent.

== Screenshots ==

1. A/B test dashboard
2. Test setup wizard
3. Experiment results
4. Account and privacy settings

== Changelog ==

= 2.3.4 =
* Ensured Analytics Dashboard and Website Tracking default to enabled when their options are missing.
* Added a versioned upgrade migration that enables both permissions for existing installations.

= 2.3.3 =
* Enabled Analytics Dashboard and Website Tracking by default for new installations and existing installations during a one-time migration.
* Added the onboarding spotlight tour for the plugin workspace and reporting tools.

= 2.3.2 =
* Security: added nonce verification to all AJAX handlers.
* Privacy: consent checks enforced on all external API calls.
* Localised admin JavaScript and CSS dependencies.
* Updated text domain to `causalfunnel` for consistency.
* Compatibility: tested up to WordPress 7.1.

= 2.3 =
* Version bump with updated readme disclosures and gitignore.

== Upgrade Notice ==

= 2.3.4 =
Analytics Dashboard and Website Tracking are enabled by default and existing installations are migrated once.

= 2.3.3 =
Analytics Dashboard and Website Tracking are enabled by default. Review or disable them in **CF Platform → Account Info** if needed.
``
= 2.3.2 =
Security and privacy improvements. All AJAX handlers now require nonce verification and consent checks.

== Support ==

For support and service documentation, visit [CausalFunnel](https://www.causalfunnel.com/).
