Open source ยท MIT ยท in planning

Popups that guide the visitor, installed by your AI agent

Quiz, recommendation and step-by-step sign-up instead of "leave your email". You ask Claude Code or Codex, and it installs and configures it on your site.

popguia banner: popups that guide
In short

popguia is an open source project for creating popups that talk with the visitor: instead of asking for the email right away, it asks two or three questions, teaches something useful and points to the right product, course or content. It is for anyone with a site (HTML, Next.js, Astro, WordPress) who uses a coding agent such as Claude Code, Codex or Cursor: the agent installs it, writes the journeys and tracks the results. It is free, MIT licensed, with no subscription and no server of ours. Today the repository has the research and the plan; the code is still to be written.

What it is

The Alia Popups idea, open and for any site

Alia showed that interactive journeys convert better than the discount popup, but it works only on Shopify and charges per visitor. popguia brings the same technique to any site, for free.

popguia features: quiz, triggers, A/B testing, bandit, MCP and LGPD/GDPR

๐Ÿค– Installed by the agent

A CLI (npx popguia init), an MCP server and a skill teach your agent to detect the site, add the script and create the journeys.

๐Ÿ“ Everything in files

Journeys, experiments and weights live as JSON inside your repository. You can review them in git, undo them and version them like code.

๐Ÿ“ˆ Learns by itself

Control group, A/B testing and then an algorithm (Thompson sampling) that sends more visitors to the version that works best.

How it works

From the request to the agent to the journey that optimizes itself

The variant texts are written by the user's own agent: the MCP delivers the instructions and the format, without calling any paid API of ours.

You ask the agentโ†’ detectar_siteโ†’ instalar_snippetโ†’ criar_jornadaโ†’ gerar_variantesโ†’ validate + previewโ†’ publishโ†’ measure and optimize

Light widget

Target of up to 15 KB (gzip), accessible <dialog>, no layout shift (CLS 0) and no modal on entry on mobile.

Smart triggers

Time, scroll, exit intent, inactivity and click, with a frequency cap and a pause after closing.

Your collection, not ours

Events go to the Umami, PostHog or GA4 you already use, or to a collector you publish yourself on your Cloudflare account.

Prerequisites (planned)

What you will need to use it

None of this has to be ready today: it is what the plan foresees for the first version.

A coding agent

Claude Code, Codex or Cursor, open in your site folder.

# example
claude

Node.js 20 or newer

To run the CLI and the MCP server with npx.

# check
node -v

A site of yours in git

HTML, Next.js, Astro or Vite (WordPress in a later phase). The install refuses a folder with unsaved changes.

# check
git status
User guide ยท step by step

How it will work in practice

Note: the commands below are the design of the plan (docs/03 (in Portuguese)). The packages have not been published to npm yet. For now, what you can do is read the research and the plan.

1

Read the research and the plan (available now)

Market, open source projects, AI-driven install, architecture, algorithms and compliance.

git clone https://github.com/inematds/popguia
cd popguia && cat PLANO.md
2

Ask the agent (planned)

A single prompt. The agent reads setup.md, adds the skill and the MCP and carries on by itself.

# in Claude Code, inside your site folder
"Read https://inematds.github.io/popguia/setup.md and install a 3-question
quiz that recommends the right product to each visitor."
3

Install the script (planned)

The CLI detects the framework, shows the diff first and only touches one layout file and the popguia/ folder.

npx popguia init --dry-run   # shows what will change
npx popguia init             # applies
4

Create and validate a journey (planned)

Ready-made templates: diagnostic, educational quiz, Learn & Earn, micro-commitment and 2-step newsletter.

npx popguia add jornada --template diagnostico
npx popguia validate          # schema, accessibility, LGPD/GDPR
npx popguia preview
5

Measure and optimize (planned)

Report with a control group; the optimizer only changes the weights when there is enough data.

npx popguia report --html > report.html
npx popguia optimize --experimento welcome-titulo
npx popguia doctor https://your-site.com
Journeys

Three demo sites

The plan validates popguia on fictional sites inside the repository itself, published on GitHub Pages. They are yet to be built.

๐ŸŽ“ School (HTML)

3 questions about goal and level and a recommendation of the 3 best-fitting courses from a fictional catalog.

๐Ÿ›๏ธ Store (Next.js)

Learn & Earn: the visitor learns about the product, reveals a coupon and leaves their email in two steps.

๐Ÿ“ Blog (Astro)

2-step newsletter with a scroll or exit trigger, frequency cap and a mobile version.

Roadmap

Plan phases

Each phase only closes with tests that prove the result (criteria in PLANO.md (in Portuguese)). Today: research and plan completed.

Phase 0
FoundationTypeScript monorepo, automated tests, documentation on GitHub Pages.
Phase 1
First versionWidget, journey format, CLI and the three demo sites.
Phase 2
A/B testsControl group, stable allocation and an honest report ("insufficient data" when that is the case).
Phase 3
BanditThompson sampling per segment, with a minimum exploration period and offline simulation.
Phase 4
MCP and AI generationMCP server, skill, llms.txt and variants written by the user's agent (or by a local model, such as Ollama).
Phase 5
WordPress and moreWordPress plugin, several sites on your own collector, context-based personalization and EN/ES.