=== Pupop – Lightweight Popups, Exit Intent & Email Capture ===
Contributors: alexhalfborg
Tags: popup, exit intent, email capture, lead generation, newsletter
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight popups for email capture, exit-intent offers and WhatsApp. One script under 15 KB, no cookies. Billed by popups shown. Free, no card.

== Description ==

Turn more visitors into leads, without slowing your site down.

Pupop adds email capture popups, discount-code popups, exit-intent offers, WhatsApp chat prompts, callback requests and announcements to your WordPress site, as modal popups or slide-ins. Each one comes from a single script under 15 KB that sets no cookies, and you pay for the popups visitors actually see, never for pageloads.

You build popups in the Pupop dashboard, and this plugin adds the script that shows them. You need a Pupop account. It's free and asks for no card.

= What you can build =

* Start from eight templates: email capture, email for a discount, discount code, exit-intent offer, WhatsApp chat, callback request, newsletter and announcement.
* Show popups after a time delay, on exit intent, at a scroll depth, after the visitor goes idle, or from your own code with `window.pupop.show(id)`. Every trigger is on every plan, free included.
* Exit intent works on phones as well as desktops, using a fast scroll back up.
* Target popups by page URL and device, and cap how often each visitor sees them.
* See impressions, conversions and click-through rate for every popup.

= Leads you can trust =

* Get an email for every new lead, and export your leads as CSV.
* Each lead keeps the exact consent wording the visitor saw, and whether they ticked it.
* On paid plans, each new lead is also sent to your own URL as a signed webhook. Failed deliveries are retried for a day, and you're emailed if they keep failing.

= Light on your page =

* One script, under 15 KB gzipped, with no dependencies. It loads asynchronously and never holds up your page.
* Popups are cached at Cloudflare's edge, so pageloads never wait on a database.
* No cookies. Frequency caps live in the browser's own storage.
* Popups render in a Shadow DOM, so your theme's CSS and the popup's never clash.
* If anything fails, the script stops silently and your page carries on.

= Pay for the popups people see =

Tools that bill per pageload can use up a monthly quota in the first week, and then your popups stop until the month resets. Pupop counts impressions only: a popup that is never shown costs nothing.

You're emailed at 80% and 100% of your monthly impressions. At the limit, popups pause until your next monthly period starts. Your plan is never upgraded automatically.

= The free plan =

5,000 popup impressions a month on one site, with every trigger and targeting rule, lead capture and CSV export. No card is needed. Free popups show a small "Powered by Pupop" credit.

Pro ($19 a month) raises that to 50,000 impressions across 4 sites, and Business ($49 a month) to 250,000 across 10 sites. Both remove the credit and add signed lead webhooks. See https://www.pupop.io/#pricing.

= A quiet plugin =

The plugin does one thing, and it doesn't:

* show notices outside its own settings page,
* add dashboard widgets,
* install or recommend other plugins,
* send telemetry,
* show upsell banners.

Pupop never shows your visitors anything you didn't publish, apart from the free plan's credit.

= WooCommerce and page builders =

The plugin adds the script to every page of your site, WooCommerce shop and checkout pages included, whatever theme or page builder you use. Use page URL rules in Pupop to choose where each popup shows.

== Installation ==

1. Create a free account at https://app.pupop.io/sign-up and add your site.
2. Install and activate the plugin from the Plugins screen in WordPress.
3. In the Pupop dashboard, open your site's settings and copy the snippet from the Install section.
4. In WordPress, go to Settings > Pupop, paste the snippet (or just its site key) and save.
5. Publish a popup in the Pupop dashboard. It shows on your site within a minute.

== Frequently Asked Questions ==

= Do I need a paid plan? =

No. The free plan includes 5,000 popup impressions a month, every trigger and targeting rule, and lead capture. No card is needed.

= Will it slow my site down? =

The script is under 15 KB gzipped, has no dependencies and loads asynchronously, so it never holds up your page. Popup settings come from Cloudflare's edge, not a database. A test in Pupop's build fails if the script grows past 15 KB.

= Does it use cookies? What about GDPR? =

The script sets no cookies. Email forms can include a consent checkbox, and each lead keeps the exact wording the visitor saw and whether they ticked it. A data processing agreement applies to every customer from sign-up, with no signature needed. See the External services section below for exactly what is sent.

= Where do I build popups? =

In the Pupop dashboard at https://app.pupop.io. Popups, their triggers and page rules, stats and leads all live there. The plugin only adds the script.

= Does it work with caching and optimisation plugins? =

Yes. The script tag tells WP Rocket, LiteSpeed Cache, Autoptimize and Cloudflare Rocket Loader to leave it alone, because delaying it would break time-delay triggers. If you change your snippet or deactivate the plugin, clear your page cache so cached pages pick up the change. The plugin asks WP Rocket, W3 Total Cache, WP Super Cache and LiteSpeed Cache to do this when it is deactivated.

= My popup doesn't show =

Check that your site's address is in your Pupop site's allowed domains. The Settings > Pupop page shows the address to add, and the Pupop dashboard lists any address that loaded the script but isn't allowed. New Pupop sites allow both the www and the bare form of your domain, but a staging site such as staging.example.com, or a second domain, needs its own entry. Also check that the popup is published, and that its page and device rules match the page you're on.

= How do I stop popups showing? =

Pause or delete the site in the Pupop dashboard. That stops its popups everywhere at once, even on pages a cache is still serving with the old HTML.

== Screenshots ==

1. An email capture popup with a consent checkbox, on a shop's product page
2. A discount-code popup offering 10% off a first order
3. An exit-intent offer, shown as a visitor is about to leave
4. A WhatsApp chat popup with email signup on a WordPress site, with the free plan's "Powered by Pupop" credit
5. Settings > Pupop: paste your snippet and save

== External services ==

This plugin connects your site to Pupop (https://www.pupop.io), the hosted service that shows your popups. It is the plugin's only external service, and the plugin cannot work without it.

Nothing loads until you save a site key under Settings > Pupop. After that, your visitors' browsers:

* load the Pupop script `p.js` and your site's popup settings from `https://cdn.pupop.io` on every page,
* send popup events to `https://cdn.pupop.io`: when a popup is shown, when a button in it is clicked, and when it is closed. Each event carries your site key, the popup, the page path, the device type (mobile or desktop) and an anonymous session id,
* when a visitor submits a form in a popup, send the fields they filled in and the consent wording they saw to `https://cdn.pupop.io`, so you can see them as leads in the Pupop dashboard.

As with any web request, the visitor's IP address and browser user agent reach Pupop's servers. Pupop uses the IP address only to limit how often one visitor can send events, and does not store it.

The script sets no cookies. It keeps the anonymous session id in sessionStorage, which the browser clears when the tab closes, and how often each popup has been shown in localStorage, so that a popup's frequency limit is kept.

The WordPress plugin itself sends nothing from your server.

* Pupop Terms of Service: https://www.pupop.io/terms
* Pupop Privacy Policy: https://www.pupop.io/privacy

== Changelog ==

= 1.0.0 =
* Initial release.
