Coupon and discount codes
The Coupon element shows a discount code in a widget. Visitors click it to copy the code. On Shopify it can also generate a unique code for each display from one of your Shopify discounts, and auto-apply the code to the visitor's cart so they don't have to type it at checkout.
Available on: all platforms for static codes. Unique codes and auto-apply: Shopify (Online Store and Hydrogen).
Static vs unique codes
| Static code | Unique code (Shopify) |
|---|---|---|
What's shown | The same code to everyone, for example WELCOME10 | A new code for every display, for example PLY-4F9A0C21BE |
Where the discount lives | You create the code in your store's admin | Under an existing Shopify discount; Personizely adds codes to it |
Sharing and coupon sites | The code works for anyone who gets it | Each code is unique; usage limits set on the Shopify discount apply to every generated code |
Setup | Type the code in Discount | Choose the Shopify discount in Discount, then turn on Unique |
How it works
- The code is ready when the element becomes visible. A static code shows immediately. A unique code shows ... while Personizely creates a new code under the chosen Shopify discount, then shows it.
- Auto-apply (Shopify, on by default). As soon as the code is visible, Personizely applies it to the visitor's cart and remembers it in the visitor's browser. Product Buy now buttons in Personizely widgets pass it to checkout too. Each apply is recorded as a coupon apply event.
- Click to copy. Clicking the coupon copies the code to the clipboard and briefly shows the Message (default "COPIED!"). Each copy is recorded as a coupon copy event.
- Orders are attributed. When an order uses a code this widget applied or a visitor copied, the order counts toward the widget's revenue. See Goals and Revenue attribution.
Configuration
Settings tab:
Option | What it does | Values / default |
|---|---|---|
Discount | The code to show. On Shopify, the field suggests your existing discount codes; picking one links the element to that Shopify discount | Text, for example SALE2024 |
Unique | Generates a new code under the linked Shopify discount each time the element is displayed | Shown only when a Shopify discount is selected. Off by default |
Prefix | Text placed before each unique code | Empty by default (placeholder PLY-). The rest of the code is 10 random characters |
Message | Text shown for a moment after the code is copied | "COPIED!" by default. Leave empty to show no message |
Auto apply | Applies the code to the visitor's cart when the coupon becomes visible | Shopify only. On by default |
Time limit | Limits how long the code is kept for auto-apply, in a cookie in the visitor's browser | Off by default |
Apply for | Duration for Time limit | 5 minutes when you turn on Time limit |
Style tab: typography, background, border, size, layout, spacing and position, with hover, focus and active states. New coupons are styled as a dashed "chip" in your brand color.
Behavior details and limitations
- A new unique code is created every time the element is displayed. That means every page view or step view where the coupon becomes visible creates a code, whether or not the visitor uses it. Busy widgets add many unused codes to the Shopify discount. Use a Frequency rule so the widget doesn't show again to the same visitor, and put the coupon on a step that only the right visitors reach (for example after a form submit).
- Shopify discount settings apply to every generated code. Set the discount's value, minimum purchase, eligible products, end date and usage limits (such as Limit to one use per customer) in Shopify before you link it.
- The time limit only controls auto-apply. Apply for sets how long the code is kept for auto-apply, in a cookie in the visitor's browser. It doesn't remove a discount Shopify has already applied to the cart, and it doesn't expire the code itself. To make a code stop working, set an end date or usage limit on the discount in Shopify.
- Without a time limit, the code is kept for auto-apply for 1 year, the default lifetime of Personizely's cookies. See Cookies and consent.
- Auto-apply happens on visibility, not on click. A coupon on a later step is applied only when that step is shown. Visitors who never see the coupon don't get the discount.
- Other platforms (Wix, WordPress, Webflow, custom sites): the coupon shows a static code and copies it on click. Create the code in your platform's admin.
- Auto-apply sets the cart's discount code. It can replace a code the visitor entered in the cart earlier. Whether discounts stack at checkout depends on your discount combination settings in Shopify.
Examples
- Welcome popup with unique codes: step 1 a form with action Go to step; step 2 a coupon linked to a 10% Shopify discount with Unique on, prefix WELCOME-, auto-apply on. Frequency: stop after converted.
- Exit offer that expires: a static STAY15 coupon with auto-apply and Apply for 30 minutes, next to a 30-minute countdown timer. Set the matching end date in Shopify for a hard expiry.
- Wheel prizes: a coupon on each prize step of a Wheel of Fortune, each linked to its own Shopify discount.
Troubleshooting
- The coupon shows ... forever → the linked Shopify discount was deleted or Personizely lost access to it. Re-select a discount in Discount.
- The code isn't in the cart at checkout → auto-apply is off, the coupon was never visible, or the theme's cart overrides discounts. Check that the discount is active and that the cart meets its minimum requirements.
- Thousands of unused codes in Shopify → the coupon with Unique on shows on every page view. Add a frequency rule or move the coupon behind a form step.