Build a spin-the-wheel discount pop-up with Claude
A Black Friday discount wheel in your shop’s colors and fonts, built in Claude in about 30 minutes and pasted into WordPress or Shopify. No monthly app fee.
Why a wheel sells
People love to win, basically anything. That’s why a discount wheel helps an online shop sell more, and why it works so well during a big sale like Black Friday, when you want people to decide right away. The discount feels like something they won. And a code that’s valid only until Sunday gives them an additional reason to buy immediately.
We’ve put discount wheels on our clients’ online shops, and they work. 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 wheel is a piece of code that goes into your website, so check this first:
- WordPress (on your own hosting, the most common setup): you only need to be an administrator of the site (more in step 4).
- WordPress.com (if your site address or your bill says WordPress.com): any paid plan works (Personal and up). The Free plan can’t add code. On a paid plan, install at least one plugin first. That’s what lets your site accept custom code.
- Shopify: you need the Basic plan or higher. The Starter plan can’t edit its theme.
Step 1: Pick your prizes and create the codes
Every spin wins something. A good mix looks like this:
- 10% off
- 20% off
- free delivery
- one big win, like 40% off
On Black Friday, people expect a bigger discount than usual, so let the big win come up often enough that real customers get it. Just don’t give it to everyone, so it doesn’t eat your margin. In the prompt below, 40% off wins 12% of the time, about one spin in eight. And every slice has to be a prize someone can really win. A big prize that never comes up looks like a trick to customers, and in the EU, offering a prize you never award isn’t allowed. Be fair to your customers.
Before you write the prompt, create every code in your shop. Each code needs two settings: one use per customer, and valid until Sunday.
Create the codes in Shopify
- In your Shopify admin, go to Discounts and click Create discount.
- For the 10%, 20% and 40% codes, choose Amount off orders. Under Method, choose Discount code and type the code, for example CODE10.
- Under Value, choose Percentage and enter the number.
- Under Maximum discount uses, check Limit to one per customer.
- Under Active dates, click Set end date and choose Sunday at 11:59 PM. The time follows your store’s time zone.
- Save, then repeat for each percentage code.
- For free delivery, choose Free shipping as the discount type, then use the same steps: Discount code, Limit to one per customer, an end date on Sunday.
Create the codes 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 CODE10.
- Choose Percentage discount as the discount type and enter the amount as a plain number: 10, not 10%.
- Set the coupon expiry date to Monday. WooCommerce doesn’t accept a coupon on its expiry date, so a Monday date means the code works through Sunday.
- In the Usage limits tab, set Usage limit per user to 1.
- Publish, then repeat for each percentage code.
- For free delivery, create a coupon the same way and check Allow free shipping. Then go to WooCommerce > Settings > Shipping, open your shipping zone, add the Free shipping method, and set “Free shipping requires” to “A valid free shipping coupon”.
Write the codes in the prompt exactly as you created them in the shop, letter for letter.
Step 2: Your link, your prizes and my full prompt
Paste the prompt below into Claude and fill in everything in [brackets], including your prizes, codes and odds.
I run an online shop: [shop name], selling [what you sell]. My website is [link] and it runs on [WordPress / Shopify]. For Black Friday I want a "spin the wheel" discount pop-up on my site. STYLE Open [link] and take my colors, fonts and overall style from it, so the wheel looks like part of my site. If you can't open the site or can't see its design, stop and ask me for a screenshot before you build anything. PRIZES (I have already created every code in my shop) [10% off – CODE10 – wins 35% of the time] [20% off – CODE20 – wins 30% of the time] [Free delivery – FREESHIP – wins 23% of the time] [40% off – BIG40 – wins 12% of the time] [add or change prizes as you like; the percentages must add up to 100] - All slices are the same size. The odds above decide which prize wins. - Mix small and big prizes around the wheel. - The spin is smooth, takes 5–6 seconds and stops exactly on the prize that won. TEXT (in [English]) - Small label: "Black Friday · Limited time offer" - Heading: "Spin the wheel to get your discount" - Under the heading: "Every spin wins. Use your code on your next order." - Button: "Spin the wheel". Under it: "One spin per visitor." - After the spin: the prize, the code in a box with a "Copy" button, the line "[Valid until Sunday, on the whole shop.]" and a button "[Continue shopping]". HOW IT WORKS - The wheel opens 3 seconds after someone lands on the site. - One spin per visitor: remember the result in their browser. When they come back, show their code instead of the wheel. - After the pop-up is closed, a small tab stays at the side of the screen: "Spin the wheel" before the spin, "Your code: [CODE]" after it. On phones it sits at the bottom right and never covers text or product photos. - It closes with the X, the Escape key or a click outside it. "Copy" changes to "Copied" after a click. - Put the prizes, odds, codes, text 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. Check it at 390 px and 360 px wide, on the wheel screen and on the code screen. WHAT I GET 1. A preview here in the chat, on a simple page in my site's style, so I can spin it 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 wheel 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 builds the wheel in your shop’s colors and fonts. It opens 3 seconds after someone lands on your site, it gives every visitor one spin, and it keeps their code on screen in a small tab at the side, so nobody loses it before checkout.
A few lines are there on purpose.
“If you can’t open the site or can’t see its design, stop and ask me for a screenshot before you build anything.” Without it, you can get a wheel in colors that aren’t yours. If Claude asks, attach a screenshot of your home page.
“The odds above decide which prize wins.” All slices are the same size, so the wheel looks fair, and your odds still decide what people get. Your percentages must add up to 100.
“Put the prizes, odds, codes, text and delay in one settings block at the top of the code” means that next year you change a prize or a date at the top and leave the rest alone.
Step 3: Spin it in the chat, on desktop and phone size
Before anything touches your site, Claude shows you a preview in the chat. Spin it the way a customer would, on desktop and phone size, and check that:
- it looks like part of your site
- each prize shows the right code, and Copy works
- it closes, and the side tab keeps the code on screen
- on a phone it doesn’t touch the screen edges or cover product photos
Claude also tells you how to reset the wheel, so you can spin it more than once. If something’s off, ask for the change in the same chat, for example “make the wheel smaller on phones” or “open it after 10 seconds”.
Step 4: How to add the wheel 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.
This is where most people go wrong. A Custom HTML block added to one WordPress page, or a Custom Liquid section added to one Shopify page, shows the wheel 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 wheel 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 wheel 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 wheel 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. A block with only code in it can look empty in the editor. That’s normal: check it on the live site.
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, in a private (incognito) window so you see it as a new visitor, and check that the wheel or its tab shows on all three.
What the wheel can’t do
Anyone who opens your page source can see the codes. That’s why every code is one use per customer, with an end date.
“One spin per visitor” is remembered in the visitor’s browser. Someone who opens a private window can spin again. They still can’t use the same code twice.
The wheel doesn’t collect email addresses. If you want emails, you need your newsletter form for that.
What to do next
Check that your site and your plan can take the code.
Pick your prizes and create every code in your shop: one use per customer, valid until Sunday.
Paste the prompt into Claude with your link and your prizes.
Spin the preview 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 in a private window.
Use every code at checkout before you announce the sale.
Once the wheel works, you can build a product-finder quiz the same way: write the questions and the product each answer leads to, and test it in the chat first. The full prompt is in The product quiz prompt for online shops.
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.