=== WF1 Wheel ===
Contributors: dessitesby
Tags: spin wheel, wheel of fortune, lead generation, popup, gamification
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.0
Stable tag: 1.2.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Spin-to-win Wheel of Fortune popup that collects leads: visitors spin, leave contacts, and leads go to your dashboard, Telegram and CRM.

== Description ==

WF1 Wheel connects the WF1.BY "Wheel of Fortune" widget to every page of your site without editing the theme.

* prizes with win chances and issue limits, promo codes as prizes;
* leads delivered to the WF1.BY dashboard, Telegram, e-mail, Bitrix24, amoCRM, Google Sheets and Webhook;
* show the wheel on a button click, after a delay, on exit intent, after scrolling, or only on selected pages;
* 30-day free trial with all features.

The widget and all of its settings live in the WF1.BY service (https://wf1.by); a WF1.BY account is required. The plugin itself only adds the wheel loader script to the public pages of the site. It does not store visitor data and does not write anything to the WordPress database except its own setting (the loader address).

The WF1.BY dashboard and help are currently available in Russian.

== External services ==

This plugin connects your site to WF1.BY (https://wf1.by), the service that hosts the Wheel of Fortune widget. Without it the plugin does nothing.

When the install code is set, every public page of the site loads the widget script from the WF1.BY server (for example, https://wf1.by/widget/<id>.js). From that moment the widget, running in the visitor's browser, exchanges data with WF1.BY:

* on page load — the wheel settings are requested, and an anonymous visit/impression record is sent (page address, referring page, UTM tags, browser type; the visitor's IP address is seen by the server as with any web request);
* on spin — the spin request, to draw the prize on the server;
* on form submit — the data the visitor enters in the wheel form (the fields are chosen by the site owner: for example name, phone, e-mail), the prize won, the page address, UTM tags and the visitor's consent choices. WF1.BY then delivers the lead to the channels the site owner connected (dashboard, e-mail, Telegram, CRM, Google Sheets, Webhook).

The widget keeps its own state in the visitor's browser: the first-party cookies `wf1a` and `wf1i` and localStorage/sessionStorage entries (whether the prize was already shown, the current spin, UTM tags of the first visit).

In the WordPress admin, the settings page links to the WF1.BY dashboard; nothing is sent from the admin area.

WF1.BY terms of service (public offer): https://wf1.by/oferta
WF1.BY privacy policy: https://wf1.by/confidential-politics

== Installation ==

The easiest way is the plugin from your WF1.BY dashboard: open the wheel, in the "Сайт" (Site) row choose "WordPress" and click "Скачать плагин для WordPress" (Download the plugin for WordPress). The wheel code is already filled in: upload the plugin to WordPress and activate it — the wheel is on the site right away.

Installing the general build:

1. Sign up at https://wf1.by and create a wheel with the address of your site.
2. Install and activate the plugin.
3. In the WF1.BY dashboard open the wheel, in the "Сайт" (Site) row choose "Другой сайт" (Other site) and click "Копировать код" (Copy code).
4. WordPress → Settings → Wheel of Fortune → paste the code → "Save".

== Frequently Asked Questions ==

= Do I need to reinstall the code after editing the wheel? =

No. The code points to the wheel, not to its settings; changes appear on the site within five minutes.

= The wheel does not appear =

Check that the site address in the wheel settings matches the address where you are looking, and that the wheel setup is finished. If a caching plugin is active, clear its cache. Details: https://wf1.by/help/wheel-install-wordpress

= How do I remove the wheel from the site? =

Clear the field in Settings → Wheel of Fortune and save, or deactivate the plugin.

== Screenshots ==

1. The wheel on a WordPress site.
2. Plugin settings: the install code.
3. WF1.BY wheel editor: the "Сайт" (Site) row with the plugin download button.

== Changelog ==

= 1.2.2 =
* Install code instructions follow the new WF1.BY wheel editor (the "Сайт" row).

= 1.2.1 =
* Translations are delivered by translate.wordpress.org.
* The loader script is registered with the plugin version.

= 1.2.0 =
* English base strings, translatable; Russian translation included.
* The loader is added with wp_enqueue_script (asynchronously, in the footer).
* The settings field shows the loader address.
* "External services" section in the readme.

= 1.1.0 =
* A plugin downloaded from the WF1.BY dashboard comes with the wheel code filled in and enables it on activation.

= 1.0.0 =
* First release.
