AI-generated WordPress plugin

Generate a WordPress exit-intent popup plugin

Exit-intent popups have a bad reputation because most of them are terribly built: a 200KB script fighting your theme, weekly update nags, and settings designed to upsell you to Pro.

The underlying idea is fine. A timely, dismissible modal that catches a visitor as they move to close the tab can pull 2-5% of traffic into a newsletter. You do not need OptinMonster at €49/month to do it — you need ~4KB of JavaScript and a sane backend.

5 min to ZIP 24 h live sandbox WP Coding Standards

Why generate it instead of installing an existing plugin?

OptinMonster, Popup Maker Pro, and Convert Pro all bundle dozens of triggers, A/B testing, templates, and analytics dashboards. If you run a big list that is money well spent. If you just want one popup triggered once per visitor and synced to one list, you are carrying 90% dead weight.

A generated plugin has a single script that listens to mouseleave on the top edge of the window (desktop) or scrolls-up-near-the-top pattern (mobile), shows a modal with the copy you want, posts the email to your ESP, and stamps a cookie so the same person is not hassled for 30 days.

Because we build it lean, the impact on Core Web Vitals is near zero. The script is deferred, the modal markup is injected only on trigger, and the ESP call is a single REST POST from the browser.

Example prompt

This is the kind of description that generates this plugin. You can start from it and tweak whatever you need before hitting generate.

Plugin name: Acme Exit Intent

Trigger:
- Desktop: mouseleave event with clientY <= 0.
- Mobile: on scroll-up of > 60px within the first 4 seconds after reaching the bottom half.
- Fire at most once per 30 days per visitor (cookie).
- Do not fire on checkout, cart, my-account, or pages tagged "no-popup".

Modal content (editable from admin):
- Headline
- Subheadline
- Email input + submit button
- Small GDPR consent text with link to /privacy

On submit: POST to /wp-json/acme/v1/exit-intent/subscribe with email + consent + page URL.
Server endpoint: forward to Mailchimp API (list ID in settings) as subscribed with double-opt-in.

Admin:
- Copy/headline settings
- Mailchimp list ID + API key
- "Disable on pages" textarea (slugs one per line)
- Analytics: impressions, submissions, conversion % (last 30d), stored in a simple table.

No jQuery. Script ~4KB minified, deferred.

What the generated plugin typically includes

  • Tiny vanilla JS bundle enqueued only on allowed pages
  • Modal markup rendered server-side and injected on trigger
  • Cookie gate so each visitor sees it at most once per N days
  • REST endpoint forwarding to Mailchimp / ConvertKit / Klaviyo / your ESP
  • Admin page with copy editor + Mailchimp list + disable-on-pages list
  • Simple impressions/submissions counter stored in a custom table
  • Honeypot to block bots; no reCAPTCHA needed for this volume

Swap Mailchimp for any ESP with a list-add endpoint. Swap the modal for a slide-in from the corner, a bottom bar, or a full-screen takeover. All described in the prompt.

Frequently asked questions

Is this annoying for returning visitors?

Only if you set the cookie TTL too short. The default we recommend is 30 days per visitor, with full suppression on transactional pages.

What about Core Web Vitals?

The script defers and only injects markup on trigger, so CLS and LCP are untouched. We tested with WebPageTest on a vanilla theme.

Can I A/B test copy?

Yes if you describe it in the prompt. The plugin stores a variant cookie per visitor and reports conversions per variant in the admin.

Ready to generate your plugin?

Create a free account, verify your email, first generation is on us.

Related:PopupsLead generationConversion