You can add an announcement bar to Shopify in two ways: your theme’s built-in bar, or an app. The theme bar is enough for text and a link. For a live countdown and a coupon code shoppers can copy, you need an app. Either way, set up the discount in Shopify first, so the bar never promises something checkout won’t honor.
This guide walks through one sale from start to finish: create the code, build the bar, test it, and take it down on time. If you still need to decide what to say in the bar, start with our announcement bar ideas. For how a bar fits with popups, reviews and stock alerts, see the social proof guide for Shopify.
Theme bar or app: which one do you need?
Pick based on what the bar has to do. The Shopify Help Center describes the theme bar as a text message with an optional link. A theme can have one announcement bar section with up to 12 announcement blocks, and you can turn on Auto-rotate announcements (Shopify Help Center). It does not mention a countdown or a coupon field.
| You want | Theme bar | App (for example Sam FOMO Promo Bar) |
|---|---|---|
| Text and a link | Yes | Yes |
| Several rotating messages | Yes, up to 12 blocks | One message per bar |
| Live countdown | No | Yes |
| Coupon code shoppers can copy | No (type the code into the text) | Yes |
| Apply the code on click | Yes, with a shareable discount link | Yes, from the button |
| Bottom-of-page bar | Depends on theme | Top or bottom |
| Show only on some pages or devices | Depends on theme | Yes |
If your sale has no countdown, the theme bar plus a shareable discount link is often all you need. Add an app when the deadline itself is the message.
How do you set up the discount code first?
Create the discount before you touch the bar. The bar should describe a code that already works.
- In your Shopify admin, open Discounts and create a discount code.
- Set the value, the products or collections it covers, and any minimum purchase.
- Set the start and end dates. Shopify uses the time zone selected in your Shopify admin for these times (Shopify Help Center).
- Decide on limits, such as one use per customer. Put any limits on the page the bar links to.
- Save, and write down the exact code and end time. You will need both in the bar.
Use a code that is easy to read and type, such as FALL20. Avoid characters that look alike, such as O and 0, because many shoppers will type it by hand.
Get a shareable discount link
Shopify can also turn the code into a link that applies the discount for the shopper. In Discounts, open the discount, click Promote, select Get a shareable link, choose the destination and click Copy link (Shopify Help Center).
The link follows the format /discount/CODE. To land shoppers on your sale collection instead of the home page, add a redirect, for example /discount/FALL20?redirect=/collections/sale. The same Help Center page notes that the discount must be active and must not have been created by a third-party app.
How do you add a coupon code to the theme announcement bar?
This route needs no app and works in any theme that has an announcement bar section.
- From your Shopify admin, go to Online Store and click Edit theme next to your theme.
- In the Announcement bar section, click Add Announcement.
- In Text, write the offer, the code and the end date. For example: “20% off all candles with code FALL20. Ends Sunday, Nov 9 at midnight ET.”
- In the link field, paste your shareable discount link with the redirect.
- Click Save.
Shoppers who click the bar arrive on the sale collection with the discount already set to apply at checkout. Shoppers who don’t click can still type the code. Write the end date and time zone into the text, because a theme bar can’t count down on its own.
If you rotate several announcements, put the sale first. Shoppers who leave the page quickly may only see the first message.
How do you add a countdown and coupon code with Sam FOMO?
Sam FOMO includes a Promo Bar: a full-width strip at the top or bottom of every page with a message, an optional countdown, a button and a coupon code. The app is free to install and rated 4.6★ from 17 reviews on the Shopify App Store.
- Install the app and turn on the Sam Boost Sales app embed (install guide).
- Open Notifications, click Create notification, scroll to Promotions and click Add on Promo Bar.
- Under Bar, choose Top bar (all pages) or Bottom bar (all pages), then write the Message. You can use bold and links for the key words.
- Open Countdown and add a countdown timer. Pick a countdown type (see the table below) and set the end.
- Open Button & coupon. Add a button such as “Shop now” with a link to your sale collection. Turn on the coupon code and pick either your own code or one of your Shopify discount codes.
- Turn on the option to apply the code when shoppers click the button. Keep the button link on a page in your store.
- Under Visibility, choose the pages and devices, and exclude products that are not part of the sale.
- Under Colors, match the bar to your store. Keep strong contrast between the text and the background.
- If you sell in more than one language, fill in Translations.
- Check the preview, then click Save.
The promo bar guide shows each screen. The code shows in the bar so shoppers can copy it, and the button can apply it for them.
Which countdown type fits the bar?
The countdown section offers the same three types as Sam FOMO’s Countdown Timer. Match the type to how your offer really ends.
| Countdown type | Use it when | Set it to |
|---|---|---|
| Ends at a fixed date & time | A sale with one real end, such as a weekend sale | The exact end time of the discount |
| Ends every day at midnight | A deal that really changes or ends each day | Nothing extra: it resets daily |
| Per visitor, starts at first visit | Each shopper’s own offer really expires, such as a first-visit code that stops working | The real length of that offer |
A fixed date fits almost every coupon bar. For a deeper look at the other two, read how to add a countdown timer to Shopify.
Custom code or Shopify discount code?
Both show in the bar the same way. The difference is how the code gets there.
- One of your Shopify discount codes: you pick it from a list of your discounts, so there is no typo risk. Use this whenever the code lives in Shopify Discounts.
- Your own code: you type it in. Copy it exactly from the discount, and remove it from the bar yourself when the offer ends.
How do you test the bar before it goes live?
Test as a shopper, on a phone and a laptop, before you announce the sale anywhere else. A broken code is worse than no code.
- Read the bar on a phone. The offer, the code and the countdown should fit without cutting off the code.
- Copy the code. Paste it somewhere to confirm it copied exactly.
- Click the button or link. You should land on the sale page, and the discount should show in the cart or at checkout.
- Type the code by hand in a fresh browser session. It should apply to the products the bar promises.
- Check an excluded product. If you excluded products from the bar, open one and make sure the bar doesn’t show there.
- Compare the end times. The countdown should hit zero at the same moment the discount ends in your store’s time zone.
Keep one test order or draft checkout open with the discount applied. It is the quickest way to answer “my code didn’t work” emails during the sale.
What should happen when the countdown hits zero?
The offer should end at the same time. Then the bar should change.
The FTC’s 2022 staff report on dark patterns named “countdown timers designed to make consumers believe they only have a limited time to purchase a product or service when the offer is not actually time-limited” (FTC). A timer that runs out while the code keeps working fits that description. So does a timer you restart for the “same” sale next week.
Use this end-of-sale checklist:
- At the end time, confirm the discount shows as expired in Shopify Discounts.
- Within an hour, turn off or replace the bar. Swap in an evergreen message, such as your shipping threshold.
- If you extend the sale, say so plainly: “Extended: 20% off through Monday.” Don’t quietly reset the timer.
- Next day, check your support inbox for code problems and note them for the next sale.
False urgency: when countdown timers cross the line covers the rules in more detail.
How do you know if the bar is helping?
Look at what the bar is supposed to do: send shoppers to the sale and get the code used.
- Code usage: in Shopify Discounts, see how many orders used the code during the sale.
- Bar clicks: in Sam FOMO, Analytics shows impressions, clicks and click-through rate, and Performance by popup type breaks them down by type (analytics guide).
- Support emails: count “where do I enter the code?” and “code not working” messages. Fewer is a sign the bar is clear.
Change one thing per sale, such as moving the code earlier in the message or switching from a top to a bottom bar. Compare similar periods, not a holiday weekend against a quiet one.
If you also collect emails with a discount, keep the two offers apart. Running a bar code and a different email popup code at the same time confuses shoppers about which one to use.
The short version: create the discount, then the bar. Show the code, count down to the real end, test it like a shopper, and take it down the moment it stops being true.
Frequently asked questions
Can a Shopify theme announcement bar show a countdown timer?
The Shopify Help Center describes the theme announcement bar as text with an optional link, plus up to 12 announcement blocks that can auto-rotate. It does not mention a countdown or a coupon code field. For a live countdown you need an app or custom code.
How do I apply a coupon code automatically from an announcement bar?
Link the bar to a Shopify shareable discount link. The link follows the format /discount/CODE, and adding ?redirect=/collections/sale sends shoppers to a page of your choice. Shopify applies the discount to the shopper's next checkout. In Sam FOMO's Promo Bar, you can also apply the code when shoppers click the button.
Should I use a custom code or a Shopify discount code in the bar?
Either works if the code exists in Shopify Discounts, because Shopify checks every code at checkout. Picking a code from your Shopify discounts avoids typos. A custom code is typed by hand, so check the spelling against the discount and remove it when the offer ends.
Which countdown type should an announcement bar use?
Use a fixed date and time for almost every sale, set to the moment the discount ends. Use a daily countdown only for offers that really reset every day. A per-visitor countdown only makes sense when each shopper's offer really expires when their timer does.
What happens if the countdown ends but the discount still works?
Shoppers learn the deadline was not real, and in the US that pattern is something the FTC has called out. Set the discount end date and the bar end time to the same moment, and check both after the sale.
Sources
Part of our guide: Social proof →