=== Fiig ===
Contributors: miix
Tags: countdown, poll, progress bar, stock counter, newsletter
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Live countdown timers, polls, progress bars and stock counters for your email newsletters. Create Fiig widgets from WordPress and copy the embed code into your emails.

== Description ==

Fiig makes live widgets for email newsletters. A Fiig countdown is drawn at the moment someone opens your email, so the time left is always right, even days after sending. In a Fiig poll, readers vote with one click on a button in the email and see the live results. A Fiig progress bar shows how far along you are, a stock counter how many are left; both update in emails you already sent. All of them work in Gmail, Outlook, Apple Mail and other email clients.

This plugin connects your WordPress site to your Fiig account.

**Features:**

* **Widget overview**: All your Fiig widgets with a live preview, end or closing date, opens and votes
* **Create countdowns**: Name, end date and time zone; colors, corners and font come from your brand in Fiig
* **Create polls**: A question with 2 to 5 answers, an optional closing date and live results in the email
* **Progress bars**: Create them with a goal and a current value, and update the value right from the widget overview
* **Stock counters**: "Only 12 left in stock", with a warning color when stock runs low and a sold-out text at 0; update the number right from the widget overview
* **Copy and paste**: One click copies the embed code for your newsletter or the shortcode for your site
* **Shortcode**: Show any live Fiig widget in a post or page
* **Multi-language Support**: Available in English and Dutch

You need a Fiig account and an API key. Create both at [fiig.io](https://fiig.io); the key is under Account → API.

**Available Shortcode Parameters:**

* `id` - The widget id: the part of the image URL before `.gif` (required)
* `width`, `height` - Size in pixels of a countdown, progress bar or stock counter (default: the size set in Fiig)
* `alt` - Alternative text of a countdown, progress bar or stock counter (default: the alt text set in Fiig)
* `align` - center (default), left, right or none

**Example Usage:**

`[fiig_widget id="k7Qx2mPa9rTb"]` - Shows the widget centered, at its own size
`[fiig_widget id="k7Qx2mPa9rTb" align="left"]` - Floated left, text flows around it
`[fiig_widget id="k7Qx2mPa9rTb" width="300" height="100"]` - Smaller

A poll shows its question, answer buttons and live results. Visitors vote on fiig.io, in a new tab.

Views on your website do not count as email opens in Fiig.

== External services ==

This plugin connects to Fiig, a service that renders live images (such as countdown timers, poll results, progress bars and stock counters) for email newsletters.

**What data is sent and when:**

* Your Fiig API key is sent to authenticate requests to the Fiig API (api.fiig.io)
* In wp-admin, the plugin requests your widget list, widget settings, open counts and vote counts, and sends the details of widgets you create or update (name, dates, time zone, question, answers, goal, current value and stock count, texts)
* When a page with the shortcode is shown, the visitor's browser loads the widget image from fiig.email, like any other image
* The shortcode may request a widget's settings from the API (size and alt text, or a poll's question and answers); this is cached for an hour
* When a visitor clicks an answer in a poll, fiig.io opens in a new tab to record the vote

**Fiig stores no personal data about visitors or email readers: no IP addresses, only the total number of times an image was loaded and, for polls, the number of votes per answer. To prevent double votes, fiig.io sets a cookie with the chosen answer.**

**Fiig service links:**

* [Fiig website](https://fiig.io)
* [Fiig privacy statement](https://fiig.io/en/privacy)
* [Fiig API documentation](https://fiig.io/en/docs/api)

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/fiig` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Create an API key in your Fiig account under Account → API.
4. Paste the key under Fiig → Settings.
5. Create a countdown, poll, progress bar or stock counter under Fiig, or use your existing widgets under Fiig → Widgets.

== Frequently Asked Questions ==

= Do I need a Fiig account? =

Yes. The plugin works with the widgets in your Fiig account. Create an account at [fiig.io](https://fiig.io).

= Where do I change colors and fonts? =

New countdowns use your brand settings in Fiig. To change a single widget, click "Edit in Fiig" in the widget overview.

= How do readers vote in a poll? =

Each answer is a button in your email. A click opens a vote page on fiig.io that records the vote and shows the results. Email link scanners that open every link don't count as votes.

= How do I keep a progress bar or stock counter up to date? =

Change the value in the widget overview (Fiig → Widgets) and click Update. You can also change it in Fiig, or let another system do it through the Fiig API. Emails you already sent show the new value within a minute.

= Does the countdown work in Outlook? =

Yes. Outlook for Windows shows the first frame of the animation, which is always a complete, readable timer.

= Do website views count as opens? =

No. The shortcode loads the image in a way Fiig doesn't count, so your open statistics stay about your emails.

== Changelog ==

= 1.3.0 =
* Stock counters: create them under Fiig → New stock counter, update the number from the widget overview, and show them on your site with the shortcode

= 1.2.0 =
* Progress bars: create them under Fiig → New progress bar, update the value from the widget overview, and show them on your site with the shortcode

= 1.1.0 =
* Polls: create them under Fiig → New poll, see them in the overview with their votes, and show them on your site with the shortcode

= 1.0.0 =
* First release: widget overview, create countdowns, copy embed code and shortcode, [fiig_widget] shortcode
* English and Dutch

== Screenshots ==

1. Widget overview with live previews, end dates, opens and copy buttons
2. Creating a new countdown
3. Settings with the API key
4. A live countdown on your website with the [fiig_widget] shortcode
5. Help: overview
6. Help: shortcode parameters
