The product quiz prompt for online shops
A “Which product is for you?” quiz in your shop’s colors and fonts: four questions, one product picked for your visitor, and a code to buy it now. Built in Claude in about 30 minutes, pasted into WordPress or Shopify.
Why a quiz sells
Choosing is the hardest part of buying. A quiz takes that part off your visitor. They answer four quick questions and get one product picked just for them, with the reasons why. And the code that comes with it gives them a reason to buy now, which matters most during a big sale like Black Friday.
We’ve built product quizzes like this for our clients’ online shops. I built this one with the prompt in step 2, and the whole process took about 30 minutes.
Before you start: can your website take the code?
The quiz is a piece of code, just like the discount wheel, so check your website first. On WordPress with your own hosting, you need to be an administrator. On WordPress.com, you need a paid plan with at least one plugin installed. On Shopify, you need the Basic plan or higher. The details are at the start of Build a spin-the-wheel discount pop-up with Claude.
Step 1: Write one line per product and create the code
Pick the products you want in the quiz. Three to six is enough. For each one, write one line: who it’s for.
For example, for a shop that sells running shoes:
- Daily Easy: for people who run a few times a week and want comfort
- Trail Grip: for people who run off road, on dirt and gravel
- Race Light: for people training for a race who want a light, fast shoe
These lines are what the quiz is built on, so write them the way a good salesperson in your shop would say them.
Then create one discount code that works on all the products in the quiz, with an end date. Decide one more thing before you start: if a product is already on sale, does the code come off the sale price, or not apply at all?
Create the code in Shopify
- In your Shopify admin, go to Discounts and click Create discount.
- Choose Amount off products. Under Method, choose Discount code and type the code, for example QUIZ15.
- Under Value, choose Percentage and enter the number.
- Under Applies to, choose Specific products and add every product from your quiz.
- Under Active dates, click Set end date and choose the last day and time of your sale. The time follows your store’s time zone.
- Save.
Products on sale: Shopify takes the code off the price the product sells for right now. On a product that’s already on sale, the code comes off the sale price. If you don’t want the code on sale products, leave those products out in step 4.
Create the code in WooCommerce
- Check that coupons are turned on: WooCommerce > Settings > General, check “Enable the use of coupon codes”, and save.
- Go to Marketing > Coupons and add a new coupon. Type the code, for example QUIZ15.
- Choose Percentage discount as the discount type and enter the amount as a plain number: 15, not 15%.
- Set the coupon expiry date to the day after your sale ends. WooCommerce doesn’t accept a coupon on its expiry date.
- In the Usage restriction tab, add every product from your quiz under Products.
- Products on sale: in the same tab, check Exclude sale items if you don’t want the code on products that are already on sale. Leave it unchecked if the code should come off the sale price.
- Publish.
Whatever you choose, write the same thing in the prompt, in the line about products on sale. That’s how the quiz shows the same price your checkout will.
Step 2: Your link, your products, your code and my full prompt
Paste the prompt below into Claude and fill in everything in [brackets]: your shop, your link, your products with their product page links and one line each, and your code.
I run an online shop: [shop name], selling [what you sell]. My website is [link to MY shop] and it runs on [WordPress / Shopify]. For Black Friday I want a "Which [product] is for you?" quiz on my site. The visitor answers 4 questions, gets the product that suits them best, and a discount code for it. STYLE Open my website ([link]) and take the colors, fonts and overall style from it, so the quiz looks like part of my site, not like a template. If you can't open my site or can't see its design, stop and ask me for a screenshot before you build anything. MY PRODUCTS [Product name – link to the product page – who it's for, in one line] [Product name – link to the product page – who it's for, in one line] [add 3 to 6 products] - Open each product page and take the name, the current price (and the sale price, if there is one) and the main product photo from it. If you can't open a page, ask me for the price and the image link (right-click the photo on my site, "Copy image address"). - Use only what my product pages and my lines above say about each product. Never invent benefits, results or claims. - Show each photo whole, never cropped in a way that cuts off the product or a person's face. A product without a photo gets a plain block in the color of the product. THE CODE I have already created this code in my shop: [CODE], [15]% off, valid for every product in this quiz, until [date]. On products that are already on sale, the code [applies to the sale price / doesn't apply]. Calculate the price with the code exactly the way my shop does at checkout. QUESTIONS Write 4 short questions that help a visitor choose between my products, based only on who each product is for. Each question has 4 answers and a short line under every answer. Each answer gives points to the products that fit it. Every product must be able to win. If two products are tied, the answer to the question about [color / style / budget] decides. Show me the questions and the points as a table before you build, so I can approve them. [Or, if you have your own questions: paste them here with the points for each answer.] TEXT (in [English]) Start screen: - Small label: "Black Friday · [Shop name] quiz" - Heading: "Which [product] is yours?" - Text: "Four quick questions. At the end you get your match and a [15]% code for it." - Button: "Start the quiz" - Under the button, centered: "About one minute" Result screen: - The product photo, large, filling the full height of the result next to the text. On phones, the photo goes on top, full width. - The product name; 2–3 short reasons taken from the visitor's answers (only answers that point to this product); the old price crossed out and the new price with the discount, plus "with your code"; the code [CODE] in a box with a "Copy" button; a "Shop your match" button; a "Retake the quiz" link; and under a thin line, "Also for you:" with the second-best product and its price. HOW IT WORKS - The quiz opens on its own 3 seconds after someone lands on the site, but only if they haven't done it yet. Remember their result in their browser. - It can also be opened at any time from a small tab at the side of the screen: "Find your [product] · [15]% off" before the quiz, "Your code: [CODE]" after it. On phones the tab sits at the bottom right and never covers text or product photos. - Above each question: "Question 1 of 4" and a thin progress line. The close button never covers these. - Clicking an answer moves on by itself. There is a "Back" link from question 2 onward. - "Shop your match" takes the visitor to that product's page. - It closes with the X, the Escape key or a click outside it. "Copy" changes to "Copied" after a click. - Put the questions, points, products, prices, code and delay in one settings block at the top of the code, so I can change them later without touching anything else. PHONES On phones, keep 16 px of space on each side, so the pop-up never touches the screen edges. Answers go in one column. Check it at 390 px and 360 px wide, on the start screen, the questions and the result. WHAT I GET 1. A preview here in the chat, on a simple page in my site's style, so I can go through the quiz like a customer would, on desktop and phone size. 2. The final code as one block, with no test buttons, ready to paste into [my WordPress site / my Shopify store], with step-by-step instructions on where to paste it so it shows on every page, not just one. 3. How to reset the quiz while I'm testing it. 4. What to check in my shop before it goes live.
Here’s what that prompt does for you.
Claude opens your product pages and takes the names, prices and photos from them, so you don’t have to type them in. It builds the quiz in your site’s own colors and fonts, so it looks like part of your shop.
Before it builds anything, Claude shows you the questions and the points as a table. Read it like a customer would. Does every answer make sense for your products? Can every product win? Change what doesn’t fit, then say go.
A few lines are there on purpose.
“Use only what my product pages and my lines above say about each product. Never invent benefits, results or claims.” The reasons on the result screen come from your pages, not from Claude’s imagination.
“Calculate the price with the code exactly the way my shop does at checkout.” The price in the quiz has to match the price at checkout, or your customer stops trusting the code.
“Show me the questions and the points as a table before you build, so I can approve them.” You decide how the quiz thinks, before any code exists.
Step 3: Go through the quiz in the chat, on desktop and phone size
Before anything touches your site, Claude shows you a preview in the chat. Take the quiz the way your customer will, on desktop and on phone size, and check that:
- it looks like part of your site
- the photos are whole, not cut off
- the reasons on the result match the answers you gave
- the old price, the new price and the code are right
- “Shop your match” opens the right product page
Claude also tells you how to reset the quiz, so you can take it again and again.
Step 4: How to add the quiz to WordPress or Shopify
When the preview works, Claude gives you the final code as one block. That block has to go somewhere that loads on every page of your shop, not just one.
A Custom HTML block added to one WordPress page, or a Custom Liquid section added to one Shopify page, shows the quiz on that page only. Someone who lands on a product page from an ad never sees it.
Shopify: paste it into theme.liquid
theme.liquid is your theme’s main layout file, and every page of your store loads through it. That’s why the quiz goes there.
- In your Shopify admin, go to Online Store > Themes. Duplicate your current theme first, so you have a backup: click the three dots (…) and choose Duplicate.
- On your current theme, click the three dots (…) again and choose Edit code.
- In the Layout folder, open theme.liquid.
- Find the line </body> near the end of the file. Paste the whole block on the line just above it.
- Click Save.
After a theme update, check that the quiz is still there.
WordPress: paste it into the footer
First check which kind of theme you have. If your Appearance menu shows Editor, you have a block theme. If it shows Widgets and Customize, you have a classic theme. You need to be logged in as an administrator. WordPress removes scripts saved by users without full permissions.
Block theme (use this if you have Editor):
- Go to Appearance > Editor and open any template that shows your footer.
- Select the footer and choose Edit original.
- Add a Custom HTML block inside the footer, paste the whole block and click Save.
The footer is a template part, and WordPress updates a template part on every template that uses it. That’s what puts the quiz on every page. On the newest WordPress, the Custom HTML block opens with three tabs: HTML, CSS and JavaScript. Paste the whole block into the HTML tab. WordPress saves it as one piece of code, so you don’t need to split it.
Classic theme (use this if you have Widgets):
- Go to Appearance > Widgets and find the widget area in your footer.
- Add a Custom HTML widget, paste the whole block and save.
This works only if the footer widget area shows on every page. If there isn’t one, ask whoever built your site to add the code to the theme’s footer.
Then open your home page, a product page and the cart, and check that the quiz or its tab shows on all three.
What the quiz can’t do
Anyone who opens your page source can see the code. That’s why the code needs an end date.
The result is remembered in the visitor’s browser. Someone who opens a private window can take the quiz again.
The prices are saved in the quiz’s settings block. If you change a price in your shop, change it there too.
If you sell supplements, cosmetics or any other regulated product, the quiz may only say what your product pages already say. No health claims and no promised results.
If you also run the discount wheel from Build a spin-the-wheel discount pop-up with Claude, both would open on their own after 3 seconds, and both tabs would sit at the bottom right on phones. Ask Claude to let only one of them open on its own, and to move one tab to the other side.
What to do next
Check that your website and your plan can take the code.
Write one line for each product: who it’s for.
Create one code for all of them, with an end date, and decide what happens on sale products.
Paste the prompt into Claude with your link, your products and your code, and approve the questions table.
Go through the quiz in the chat on desktop and phone size.
Add the code to theme.liquid in Shopify, or to your footer in WordPress, and check three pages.
Take the quiz until every product has won once, and check every price at checkout.
Save this guide
The full guide and the prompt in one PDF. Free, no sign-up.
Get the free Starter Kit
7 prompts and a weekly routine to run your marketing with AI, then new guides by email.