Mobile quiz funnel
A product quiz for visitors from Instagram ads that recommends a bundle and captures the lead before the result.
Demo project, fictional brand · WordPress plugin

The problem
Paid social traffic lands on phones and leaves quickly. A short quiz keeps those visitors engaged and turns answers into a qualified lead.
How I tested it
Re-run on 18 November 2026 after the fixes: 12 PHP unit tests (PHP 7.4, 8.3 and 8.4), 12 JavaScript tests, 33 integration tests (all pass on WordPress 7.1.2 with PHP 8.3 and 8.4, and on WordPress 6.4.7 with PHP 7.4) and 23 browser tests on WordPress 7.1.2 with PHP 8.3 (11 desktop, 12 at a 360x740 phone size), all passing.
| Suite | Tests | Where it ran |
|---|---|---|
| PHP unit | 12 | PHP 7.4, 8.3 and 8.4 |
| JavaScript | 12 | Node 22 |
| Integration | 33 | WordPress 7.1.2 with PHP 8.3 and 8.4; WordPress 6.4.7 with PHP 7.4 |
| Browser | 23 | WordPress 7.1.2 with PHP 8.3: 11 desktop, 12 at a 360x740 phone size |
How the quiz branches
The first question, your main goal, sets the path. The energy goal adds a caffeine question, so that path has 9 questions; every other goal has 8. How often you train then decides whether you get a barriers question or an intensity question.
What I built
- Eight or nine questions, depending on the answers, with branching and a progress bar that stays correct when the path changes.
- Branching rules are checked whenever the quiz loads. A broken target, an unreachable question or a loop shows an admin notice with the fix, and the shipped quiz is used until it is fixed.
- Lead step with separate, unticked marketing opt-ins and a typo check on email domains.
- Result worked out on the server: a personal bundle, its price and the reasons. The result card lists each item with its name and price and says: "This is a product suggestion, not medical advice."
- When a store product is linked to the result, the card shows a one-tap add-to-cart button. It calls the store's add-to-cart address and shows "Added" or an error; if the store cannot add it directly, the button links to the product page.
- Leads stored in WordPress with campaign source and a CSV export. They are kept 180 days by default, then purged daily.
- Privacy: a privacy policy text for the site, and personal data export and erase that include the campaign source fields.
- The questions, answers, results and admin screens go through WordPress translation functions (text domain qf-quiz-funnel).
Screens


Built with: WordPress plugin, PHP, JavaScript; the quiz goes on a page with a shortcode.