=== DigitalCube Popup Builder ===
Contributors: digitalcubedesigns
Tags: popup, exit intent, popup builder, lead generation, analytics
Requires at least: 6.2
Tested up to: 7.0
Stable tag: 0.3.1
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight, accessibility-first popup builder with FREE exit-intent triggers, built-in analytics and a native block editor. No monthly fees.

== Description ==

DigitalCube Popup Builder is the no-bloat popup plugin that gives you for FREE what others put behind a paywall:

* **FREE exit-intent trigger** — catch visitors before they leave (desktop + mobile fallback)
* **FREE built-in analytics** — views, clicks, CTR, conversions, dismissals & device breakdown
* **Block-editor native** — build popup content with the blocks you already know, plus ready-made patterns & starter templates
* **Accessibility-first** — focus trap, keyboard navigation, screen-reader support, ESC to close, reduced-motion support
* **Annoyance Guard** — automatically pauses a popup for visitors who dismissed it twice
* **Lightweight** — tiny dependency-free JavaScript, zero jQuery, zero layout shift
* **Privacy-friendly** — analytics stored in YOUR database, no external calls, no raw IPs

= Popup types (free) =

* Lightbox modal
* Slide-in (bottom right)
* Sticky bar (top or bottom)
* Fullscreen welcome mat
* Toast notification

= Triggers =

* Time delay
* Scroll depth (%)
* Exit intent (free!)
* Click on any element (CSS selector)

= Targeting & scheduling =

* Entire site / homepage only / include or exclude specific posts & pages
* Desktop / mobile targeting
* Frequency: every view, once per session, once every N days
* Smart scheduling: start & end date-time for campaigns

= DigitalCube Popup Builder Pro (optional add-on) =

Want more? The separate **DigitalCube Popup Builder Pro** add-on unlocks:

* WhatsApp chat popups
* Spin-to-Win gamified wheel
* A/B testing (50/50 split with CTR comparison)
* WooCommerce dynamic one-time coupons + revenue attribution
* AI copy generator (bring your own OpenAI-compatible API key)
* Ads & conversion tracking — Meta Pixel, Google (GA4/Ads) & GTM dataLayer, with UTM campaign attribution

DigitalCube Popup Builder Pro installs alongside this free plugin and activates with a license key. The free plugin never nags and works fully on its own.

== Installation ==

1. Upload the `popkit` folder to `/wp-content/plugins/`, or install via the Plugins screen.
2. Activate DigitalCube Popup Builder through the 'Plugins' menu.
3. Go to **Popups → Add New Popup**, design your popup with blocks (try the DigitalCube Popup Builder templates!), choose a trigger, and publish.

== Frequently Asked Questions ==

= Does the free version include exit-intent? =

Yes! Exit-intent is 100% free — forever.

= Where is analytics data stored? =

In your own WordPress database. DigitalCube Popup Builder makes no external calls and stores no raw IP addresses.

= What needs DigitalCube Popup Builder Pro? =

WhatsApp popups, spin-to-win, A/B testing, WooCommerce coupons, AI copy and ad-platform conversion tracking. Everything else is free.

= Will popups slow my site down? =

No. DigitalCube Popup Builder ships a tiny dependency-free script, loads it only on pages where a popup is active, and uses position:fixed rendering for zero layout shift.

== Changelog ==

= 0.3.1 =
* New: “Upgrade to Pro” page under Popups (after Analytics) — shows the DigitalCube Popup Builder Pro features with a link to the plans & pricing page. Automatically hidden once DigitalCube Popup Builder Pro is active.

= 0.3.0 =
* Architecture: DigitalCube Popup Builder is now a free, self-contained core with a clean add-on API. Premium features (WhatsApp, spin-to-win, A/B testing, WooCommerce coupons, AI copy, ads tracking) moved to the separate DigitalCube Popup Builder Pro add-on
* New: extension hooks (popkit_loaded, popkit_default_settings, popkit_popup_types, popkit_meta_render, popkit_frontend_config, popkit_js_config, popkit_popup_inner, popkit_settings_sections, popkit_analytics_after_table, and more) so add-ons extend the core without touching it
* Improved: free core has no license nag and works fully on its own

= 0.2.7 =
* New: Ads & conversion tracking — fire popup events to Meta Pixel, Google (GA4/Ads gtag) and GTM dataLayer
* New: UTM attribution — every view/click/conversion records utm_source & utm_campaign
* New: Analytics “Ad campaign attribution” table showing which ad drove conversions

= 0.2.6 =
* New: "Create your own template" — save any popup as a reusable template; star ⭐ a primary template; "Use a Template" button on All Popups

= 0.2.5 =
* New: "Show close (×) button" toggle per popup (ESC key still always closes for accessibility)

= 0.2.4 =
* New: Templates page inside the plugin menu with visual preview cards and one-click "Use This Template"

= 0.2.3 =
* New: 7 premium redesigned templates — gradient backgrounds, bold typography, urgency & social proof

= 0.2.2 =
* New: ready-made templates, analytics device breakdown, "Ignore my own visits" + IP exclusion list

= 0.2.1 =
* New: per-popup padding control (0 = edge-to-edge color) and width control; fixed stray margins

= 0.2.0 =
* New: WhatsApp, Spin-to-Win, Toast types; A/B testing; WooCommerce coupons & revenue; smart scheduling; AI copy; block patterns (now part of DigitalCube Popup Builder Pro as of 0.3.0)

= 0.1.0 =
* Initial release: block-native builder, 5 popup types, 4 triggers, display rules, frequency capping, Annoyance Guard, built-in analytics dashboard, accessibility baseline.

== Upgrade Notice ==

= 0.3.1 =
Adds an “Upgrade to Pro” page and confirms the free/Pro add-on architecture. Safe update.
