Popups
Turn the popup manager on or off, hide a popup, and change the Klaviyo offers and need-help popups.
The popup manager decides which popup a shopper sees and how many. It coordinates Klaviyo forms with the theme's own popups so that only one is open at a time.
Every setting on this page is in Online Store > Themes > Customize, under the gear icon.
Turn the popup manager on or off
Popup Manager > Enable popup manager is the master switch, and it is on by default. Turning it off deletes no popups. The theme stops coordinating them, so Klaviyo forms go back to the timing set in Klaviyo, and several theme popups stop appearing.
Hide a popup
Popup Manager > Blacklist takes one entry per line. Each entry is a selector and a type, separated by a comma.
YbQ8kH,klaviyo
.global-popup,customFor a Klaviyo form, the selector is the Klaviyo form ID and the type is klaviyo. For a popup the theme renders itself,
the selector is a CSS selector and the type is custom.
The theme hides each blacklisted popup with CSS when the page is rendered, before any JavaScript runs, so it does not flash on screen.
The blacklist only hides the popup. It does not remove the popup from the popup manager. If Klaviyo still loads a blacklisted form, the popup manager can open it later, and opening it removes the hiding CSS. To make sure a Klaviyo form never appears, also turn the form off or change its targeting in Klaviyo.
When popups open
The manager tries the first popup 5 seconds after the page loads. After that it checks every 15 seconds. A popup opens only when no other popup is open and fewer than two popups have opened on this page view.
Closing a popup restarts the 15-second countdown, so the next popup never opens straight away.
The code sets the limit of two per page view. A custom.max_allowed_popups product metafield exists, but the popup
manager does not read it, so setting it changes nothing.
When several popups are waiting, the one with the highest priority opens first. The next one can open 15 seconds after the first closes, if the limit allows. Developers set priorities in code. The theme's own popups all share one priority and open in the order the theme registers them. Klaviyo forms that the manager detects on the page rank below them.
Change the offers popup on product and Medispa pages
The Klaviyo group holds these settings.
| Setting | What it does |
|---|---|
| Enable Offers CTA and Popup on PDP | Turns the offers popup on for product pages |
| Klaviyo Popup ID (Desktop) and (Mobile) | Which Klaviyo form opens, per device |
| Enable Offers CTA and Popup on Medispa pages | The same for Medispa pages |
| CTA Label | Wording of the link that opens it |
| Display mode | Whether the trigger shows as text or another style |
Set both the desktop and the mobile form ID. The offers link does nothing if either one is empty. It also does nothing while another popup is open, so test it with no other popup on screen.
To use different forms for one product, set the custom.klaviyo_form_id_desktop and custom.klaviyo_form_id_mobile
metafields on the product.
Change the collection page popup
On collection pages, the theme opens a Klaviyo form directly, outside the popup manager's timing and limit. It takes the
form IDs from the collection's custom.klaviyo_form_id_desktop and custom.klaviyo_form_id_mobile metafields, under
Products > Collections > [collection] > Metafields. When the storefront URL has a language or market prefix, the
theme adds it to the metafield name. For example, pages under /zh-TW read custom.klaviyo_form_id_desktop_zh_TW.
Leave the metafields empty to stop this popup on that collection.
The script sets a cookie so mobile shoppers see the form at most once every 5 days. On desktop it checks a different cookie from the one it sets, so a desktop shopper can see the form on every collection page they load. Fixing that needs a developer.
This popup only runs while Enable popup manager is on.
Change the Need help finding something popup
Need Help Finding Something Popup holds a desktop image, a mobile image, a title, and three call-to-action slots. Each slot has a label, an element ID, a link and a type. Leave a slot's label empty to hide that call to action.
Business rules
Some popups check for a Klaviyo profile cookie and do not open for shoppers who have already signed up. Test them in a private window, or clear your cookies first.
Medispa pages and the rest of the store use separate sign-up popups. Changing one does not affect the other.
The popup called global-popup is switched off in code. Its section and settings still appear in the theme editor, but
editing them changes nothing on the storefront. See Legacy and unused code.
Verify the change
- Open a private window and load the page where you expect the popup.
- Wait at least 5 seconds with the tab in front. The 15-second countdown pauses while the tab is in the background.
- Confirm the right popup opens, and that only one is open.
- Close it, wait another 15 seconds, and confirm the next popup behaves as you expect.
- If you changed the blacklist, wait through at least two 15-second checks and confirm the hidden popup does not appear.
- Repeat on mobile, because desktop and mobile use different Klaviyo form IDs.
If nothing appears, or a hidden popup still shows, see Popups not appearing.
Developer map
| Concern | Source |
|---|---|
| Blacklist CSS and collection page popup | snippets/popup-logic.liquid |
| Registration, first attempt and countdown | src/entrypoints/popup-logic.ts |
| Priority and per-page limit | src/components/popup-logic/index.ts |
| Countdown timer | src/components/popup-logic/timer.ts |
| Klaviyo and custom adapters | src/components/popup-logic/adapters/ |
| Klaviyo form detection and its priority | src/components/popup-logic/sniffers/klaviyo.ts |
| Individual popups and their priorities | src/components/popup-logic/definitions/ |
| Offers link | src/entrypoints/klaviyo-popup-trigger.ts |
| How it fits together | Architecture: popup system |