By the numbers
- 4.98%conversion for popups on mobile, against 3.67% on desktopWisepops popup statistics 2026
- 54.42%conversion for click-triggered popups, shown only to visitors who askedWisepops popup statistics 2026
- 200 msor less for a good Interaction to Next Paint, measured at the 75th percentile of page loadsweb.dev, Web Vitals
- Mar 1, 2027when Shopify stops injecting storefront script tags into pagesShopify, storefront script tag deprecation
Vendor figures are averages across many stores, not controlled tests. Use them to decide what to test first.
Why the usual app install does not reach a headless store
Shopify apps add storefront code through a theme app extension: an app embed block the merchant turns on in the theme editor, one theme at a time. A Hydrogen or Next.js storefront does not render a Shopify theme, so that embed never loads, and the popup never appears however the app is configured. The older route, script tags, is closing too: since October 1, 2026 apps can no longer create or update them, and from March 1, 2027 Shopify stops injecting them. On a headless store, the popup script belongs in your own code.
Install the app, then add your domain
Install the popup app from the Shopify App Store as usual, so it is tied to your shop and your Klaviyo account. Then tell it where your storefront lives. In Veya, open Settings, then Your store, and choose Custom or headless storefront. Add the storefront's domain under Other domains, up to 5 of them, for example a separate staging or regional site. Once a domain is added, the theme embed prompts step aside, and the install check looks for the script on every domain you listed.
Put the script in the root layout
Add one script tag where it loads on every page: in Hydrogen that is app/root.tsx, and in Next.js app/layout.tsx. Veya's script is a single deferred tag that carries your site ID, copied from the Install page, so it does not block the first render. Deploy, then click Check again on the Install page to confirm Veya can see it. Do not add it per route or inside a component that remounts, or the visitor may load it more than once in a session.
Allow the script in your Content Security Policy
Hydrogen ships a default Content Security Policy, generated by createContentSecurityPolicy in the server entry, and a strict policy blocks any script host it does not list. Pass extra directives to that function: add the Veya script host, which the Install page names, to the script sources it loads from and the connect sources it calls. Hydrogen's Script component adds the nonce for you. Other frameworks with a CSP header need the same two additions. If the popup does not appear after deploy, the browser console usually names the blocked directive.
Route changes in a single-page storefront
A headless store changes pages without a full reload, so a popup script that only reads the URL once would treat the whole visit as one page. Veya watches the browser's history: each client-side navigation counts as a new page, and the form's rules are checked again, so a form limited to product pages or set to appear on the third page works as on a theme. The script stays loaded across routes, which also keeps the frequency cap and the signed-up state consistent through the visit.
What targeting works without a theme
Rules that read the page and the visitor work the same on a headless site: path or URL, URL parameters, referrer and UTM tags, paid ad platform, device, country and language, visits, pages and time on site, and the local hour and weekday. Rules that come from Shopify's theme are off: cart contents and value, signed-in customer and customer tags, since a headless storefront does not expose those to the script. If you relied on a cart-value rule, move that offer to a path rule on your cart route.
Discount codes on a headless checkout
On a theme store a popup app can often apply the welcome code to the cart. Veya never touches a headless cart, so on a headless store the shopper enters the code at checkout. Make that easy: show the code clearly on the success screen and say where to use it. Send it again in the welcome email too. Veya passes each signup's code to Klaviyo as veya_offer_code, so the first email of the welcome flow can repeat it for anyone who closed the popup too fast.
Consent banners and tracking
On a theme store, Veya reads Shopify's customer privacy settings to decide what it may store and when it may tell Klaviyo who signed up. On a headless store it cannot read them. If you ask visitors for tracking consent, load the Veya script only after they agree, from the same place your banner releases other scripts. Klaviyo's onsite identify after a signup, which links later browsing to the new profile, runs only when your site also loads Klaviyo's own script, so add that to the same consent gate.
Mind speed and mobile
A headless build is often chosen for speed, and a popup should not undo it. Load the script deferred, give the form a delay or scroll trigger rather than showing it on load, and check Core Web Vitals afterward: good is an Interaction to Next Paint of 200 ms or less and a Largest Contentful Paint within 2.5 seconds, at the 75th percentile. Design for phones first: Wisepops measured mobile popups at 4.98% against 3.67% on desktop. A click trigger from your own button, using a data-veya-open attribute, converted at 54.42% in the same data.
Test it on the deployed site
Veya serves forms only to the domains your store lists, so test on a deployed preview or staging domain added under Other domains, with your production CSP in place. Open a private window on a phone width, land on the page the form targets, and move between routes to confirm the trigger and frequency cap behave. Sign up with a test address and confirm the profile, consent and code reach Klaviyo. Then check the checkout accepts the code and the console shows no blocked requests.
Brief Veya
Send your storefront's domains, the framework it runs on, and whether a consent banner gates scripts. Describe the offer and say whether the code is shown in the popup, the welcome email or both. Name the routes the form should appear on, any button that should open it, and whether you want SMS as a second step. Add brand colors, fonts and two or three reference stores, and we design around them.
Questions
Does a popup app work with Shopify Hydrogen?
Not through the usual theme app embed, because Hydrogen does not render a Shopify theme. It works when the app gives you a script to add yourself. With Veya you install the app as usual, add your Hydrogen domain under Settings, paste the script into app/root.tsx, allow its host in Hydrogen's Content Security Policy, and deploy.
Why doesn't my Shopify popup show on my headless store?
Shopify popup apps usually load through an app embed in the theme editor, and a headless storefront has no theme, so the embed never runs. Shopify is also retiring storefront script tags, which stop being injected on March 1, 2027. Add the popup's script to your own root layout instead, then check your Content Security Policy for a blocked host.
Do I need to change my Content Security Policy for a popup?
If your site sends a Content Security Policy, yes: Hydrogen does by default. Add the popup script's host to the directives for loading scripts and for network requests, through createContentSecurityPolicy in Hydrogen or your framework's header settings. Without it the browser blocks the script and the popup never appears, with an error in the console.
Will the popup reset on every route change in a single-page app?
Not if the script is loaded once in the root layout. Veya listens for client-side navigations, counts each as a new page and checks the form's rules again, while keeping the visit's state. A visitor who closed the form or signed up is not asked again on the next route.
Can a headless Shopify popup apply the discount code automatically?
Veya does not change a headless cart, so the shopper enters the code at checkout. Show the code clearly after signup, say where to enter it, and repeat it in the first welcome email: Veya sends each signup's code to Klaviyo as veya_offer_code for exactly that.
Sources
- Shopify, storefront script tag deprecation
- Shopify, theme app extension configuration (app embed blocks)
- Shopify, Hydrogen content security policy
- web.dev, Web Vitals thresholds
- Wisepops, 20+ popup statistics 2026
Figures checked November 6, 2026.