=== ConvertWheel – Spin-to-Win Lead Capture ===
Contributors: huzaifafarrukh
Tags: lucky wheel, gamification, popup, lead capture, woocommerce
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Engage visitors, capture emails, and boost sales with high-converting gamified spin-to-win discount wheels.

== Description ==

ConvertWheel is a high-performance, gamified lead capture WordPress plugin engineered to turn bouncing traffic into loyal subscribers and customers.

Create beautiful, responsive spin-to-win discount wheels with live interactive customizer controls, physics-based canvas animations, and reliable anti-cheat protection.

= Key Features =

* **Physics-Based Canvas Wheel**: Crisp, high-DPI HTML5 canvas rendering on all devices with ticking audio and celebration confetti.
* **WooCommerce Integration**: Automatically generate unique discount coupons and add free gift products directly to the customer cart.
* **Anti-Cheat Security**: HMAC-signed challenge tokens with server-side RNG determination prevent client-side inspection or tampering.
* **Granular Triggers**: Exit intent, scroll depth, time delay, click triggers, and floating pull-out launcher widgets.
* **ESP & Webhook Integrations**: Push captured leads in real time to Mailchimp, Klaviyo, ConvertKit, MailerLite, Brevo, or custom webhooks.
* **Privacy Tools**: Native opt-in consent fields plus WordPress privacy export and personal-data erasure integration.
* **Lightweight & Fast**: Zero heavy frontend runtime dependencies for instant page loads.

== Installation ==

1. Upload the plugin archive to your WordPress site via **Plugins > Add New > Upload Plugin**, or extract into `/wp-content/plugins/convertwheel/`.
2. Activate **ConvertWheel** through the **Plugins** screen.
3. Go to **ConvertWheel** in your WordPress admin menu to configure your wheels and prize slices.

== Editor source and build ==

The human-readable editor source is in `admin/app/`, with `admin/app/index.js` as the JavaScript build entry point and `admin/app/style.css` as the Tailwind CSS entry point. Install the development dependencies with `npm install`, then run `npm run build` from the plugin root to generate `admin/build/editor.js` and the minified `admin/build/editor.css`. React and ReactDOM are mapped to WordPress's `wp.element` through the existing `admin/src/wp-element-shim.js` shim instead of being bundled separately. The generated files are used by the plugin.

== Frequently Asked Questions ==

= Does ConvertWheel require WooCommerce? =
No. ConvertWheel works as a standalone lead generation tool on any WordPress site. When WooCommerce is active, advanced coupon and gift features are automatically enabled.

= Are spin results determined on the client or server? =
All prize outcomes are calculated securely on the server with signed tokens and slice probability weighting to prevent cheat tools.

== External services ==

ConvertWheel can optionally send submitted lead data to third-party marketing or automation services. No integration is contacted unless a site administrator enables and configures that integration. When an enabled integration is used, data is sent after a visitor submits a valid ConvertWheel entry and the spin is processed. Site administrators are responsible for configuring their forms and integrations in accordance with the consent and privacy requirements that apply to their site.

= Mailchimp =
Mailchimp is an email marketing service. When enabled, ConvertWheel sends the submitted email address and, when present in the form, first name, last name, and phone number to the Mailchimp audience selected by the site administrator. Requests are sent to the Mailchimp API at the account's `*.api.mailchimp.com` data-center host. The configured Mailchimp API key and audience/list identifier are used to authenticate and route the request.
Terms: https://mailchimp.com/legal/terms/
Privacy: https://mailchimp.com/legal/privacy/

= Klaviyo =
Klaviyo is a marketing automation service. When enabled, ConvertWheel sends the submitted email address and, when present in the form, first name, last name, and phone number to the Klaviyo list selected by the site administrator. The request creates an email marketing subscription in Klaviyo and is sent to `https://a.klaviyo.com/`. The configured API key and list identifier are used to authenticate and route the request.
Terms: https://www.klaviyo.com/legal/terms-of-service
Privacy: https://www.klaviyo.com/legal/privacy/privacy-notice

= Kit (formerly ConvertKit) =
Kit is an email marketing service. When enabled, ConvertWheel sends the submitted email address and, when present in the form, first name to the Kit form selected by the site administrator. Requests are sent to Kit's legacy ConvertKit API host at `https://api.convertkit.com/`. The configured API key and form identifier are used to authenticate and route the request.
Terms: https://kit.com/terms
Privacy: https://kit.com/privacy

= MailerLite =
MailerLite is an email marketing service. When enabled, ConvertWheel sends the submitted email address and, when present in the form, first name, last name, and phone number to MailerLite. If a group is configured, the subscriber is also assigned to that group. Requests are sent to `https://connect.mailerlite.com/`. The configured API key and group identifier are used to authenticate and route the request.
Terms: https://www.mailerlite.com/legal/terms-of-service
Privacy: https://www.mailerlite.com/legal/privacy-policy

= Brevo =
Brevo is an email marketing and customer communication service. When enabled, ConvertWheel sends the submitted email address and, when present in the form, first name, last name, and phone number to the Brevo list selected by the site administrator. Requests are sent to `https://api.brevo.com/`. The configured API key and list identifier are used to authenticate and route the request.
Terms: https://www.brevo.com/legal/termsofuse/
Privacy: https://www.brevo.com/legal/privacypolicy/

= Zapier =
Zapier is an automation service. When the Zapier webhook integration is enabled, ConvertWheel sends the submitted email address, the other submitted ConvertWheel form fields, an event name, and a timestamp to the Zapier webhook URL configured by the site administrator. If a webhook secret is configured, ConvertWheel also sends a request signature in an HTTP header so the destination can verify the request.
Terms: https://zapier.com/legal/terms-of-service
Privacy: https://zapier.com/privacy

= Zapier and Custom webhook =
These webhook integrations send data to an external URL chosen and configured by the site administrator. When enabled, after a visitor submits a valid entry and the spin is processed, ConvertWheel sends the submitted email address, other submitted form fields, an event name, and a timestamp to that URL. If a webhook secret is configured, a request signature is also sent in an HTTP header. The destination service is determined by the configured URL, so its terms of service and privacy policy depend on that service. Site administrators should review those policies before enabling the integration. For Zapier, see [terms of service](https://zapier.com/legal/terms-of-service) and [privacy policy](https://zapier.com/privacy). For other custom webhook destinations, consult the terms and privacy policy of the service at the configured URL.

== Screenshots ==

1. Modern visual customizer with live interactive preview.
2. High-converting gamified wheel popup.
3. Analytics dashboard and captured subscriber entries.

== Changelog ==

= 1.0.0 =
* Initial public release.
