Shopify age verification: what an age gate does
We ran an age gate's real script in a browser. It covered the page, remembered a Yes for 30 days and skipped checkout and Googlebot. It did not stop a visitor with JavaScript off or a typed cookie.


What the gate did, case by case
Each row ran in a browser with the app's real storefront script. The last column is the matching case in the app's own test file, which runs in a simulated page instead.
| What we did | In the browser | App's own test |
|---|---|---|
| First visit, live theme | Gate shown over the whole page, page scrolling locked | Passes |
| Escape key pressed | Gate stayed | Passes |
| Yes, same page | Gate gone; cookie ck_age=1, 30 days | Passes |
| Reload after Yes | No gate | Passes |
| NoNo redirect set on the rule | Gate stayed and now reads "Sorry, you cannot enter this store."; no cookie | Passes |
| Reload after No | Gate asked again | No test; the script cannot run here |
| Checkout paths/checkout and /checkouts/cn/…/information | No gate on either | Passes |
| JavaScript switched off | No gate; the page reads in full | No test; the script cannot run here |
| Googlebot user agent | No gate | Passes |
| Cookie typed in the consoleck_age=1, no question answered | Gate gone | No test; the script cannot run here |
| Date of birth method, minimum age 21Entered 20 years old, then 30 | 20: refused. 30: let in. Stored: only ck_age=1 | Passes |
| Theme editor (simulated)Not a real editor | Small closable box, page not locked | Passes |
| Theme preview (simulated)Not a real preview | Small closable box, page not locked | Passes |
61 of 61 cases in the app's storefront test file passed on 4 November 2026.
Four things the table shows
- The gate asked a question and checked nothing. Clicking “I am 21 or older” removed it and set one cookie,
ck_age=1, for 30 days. Nothing was compared with anything, and the cookie is readable and writable by the visitor. - Two ways round it needed no skill. With JavaScript switched off the page loaded in full with no gate. Typing
document.cookie = "ck_age=1"into the console and reloading removed the gate with no question answered. - The page behind the gate is dimmed, not hidden. In the screenshot the page text is still readable, and it was in the page’s source in every run.
- The things a store owner worries about held. The gate did not show on
/checkoutor/checkouts/…, did not show to a Googlebot user agent, could not be closed with Escape, and in the simulated theme editor and preview it was a small box with a close button that did not lock the page.
A self-declared gate is a question, not a check
The gate in this test asks “are you 21 or older?” and believes the answer. That is what Cartkept Consent’s gate is: its product page says a check in the browser is a courtesy, not proof of age. The gate is useful for telling a visitor what the store expects of them, and for keeping the page out of a casual visitor’s way. It does not stop someone who wants in. Checks that ask for a document or a face scan are a different kind of service; this page does not test them.
On the way in, the visitor can also say no. With no redirect set, the gate then reads “Sorry, you cannot enter this store.” and sets no cookie, so a reload asks again.
What a gate should do, and whether this one did
An age gate that gets these wrong costs sales or locks out the person who runs the store. These are the properties we tested, each backed by a row in the table and by a case in the app’s test file, apps/consent-banner/test/storefront.test.ts:
- Never on checkout. The script skips
/checkoutand/checkouts/…. A page that only has the word in its name,/pages/checkout-guide, still shows the gate. - Closable in the theme editor and a theme preview, so the owner is never locked out of their own store. We simulated both with the switches the script reads. We did not open a real theme editor.
- Skipped for crawlers and page-speed tools, so search engines see the page. We used Googlebot’s user agent string; a real Googlebot visit may differ.
- No date of birth stored. The date-of-birth method checked the date in the browser and stored nothing but
ck_age=1. - A no always ends somewhere. A message, or an https redirect if the rule has one. We did not test the redirect in the browser; the app’s test file does.
- An unstyled gate is never shown. If the stylesheets fail to load the gate is dropped rather than shown unstyled. This is from the app’s test file only; we did not break the stylesheets.
Why we tested these
In October 2026 we read 24 one-star reviews of nine age-verification apps in the Shopify App Store. Our reading put 7 in “visitors cannot get in or it does not work on some devices”, and 4 in “breaks the store, checkout or page speed”. Those are our groupings of public reviews, not a count of how common the problems are. They are why this list is about getting in, checkout and speed, not about looks.
Where this applies, and where it does not
The page in the test is ours, not a store’s, and it holds the same embed markup the Cartkept dev store prints. We could not switch an age rule on in the dev store, because rules can only be saved from inside the app’s own admin. So this tells you what the script does, not what any particular theme does with it. A theme that hides content in its own way, or a second app that also injects a popup, can behave differently, and we did not test either.
Whether a self-declared gate is enough for your products, and in the places you sell to, is not something this page can answer. We did not read any statute or regulator’s guidance for this guide, and nothing on it is legal advice. Check with an adviser, or the regulator where your customers are.
Do you need a gate that asks at all?
Maybe not, and maybe not only that. If your products are restricted by age in a place you sell to, ask what that place expects of a seller before choosing a tool; a popup may be only part of it. If you just want visitors to know the store’s rules, a notice may do. A gate is a good fit when a courtesy check is what you want.
Check your own store in five minutes
- Open your store in a private window and see whether the gate shows. Press Escape: it should stay.
- Click the “no” button, then reload. You should be asked again.
- Open a product, add it to the cart and go to checkout. The gate should not appear there.
- In Chrome press F12, open Application, then Cookies, and look for the cookie your gate sets. Note how long it lasts.
- Open your theme editor on the live theme. The gate should be closable there.
Spot a mistake?
Write to hello@cartkept.com. Browsers and themes change; this page was tested on 4 November 2026.
How we tested
- What this is
- The app's real storefront script in Chromium on a test page, not a live store. It is not a live store and it is not a theme.
- Why not the store
- A rule can only be switched on from inside the app's own admin; the dev store holds one cookie banner rule and no age rule, and our tooling cannot write the app's settings. So the live store was read, not changed.
- Tested on
- 4 November 2026, Headless Chromium 152.0.7977.82.
- How
- The page is served from 127.0.0.1. It holds the embed markup the Cartkept dev store printed on its home page, with one age rule added to the rule list in the shape the app writes it, and a few lines of plain page content. The four storefront files (two scripts, two stylesheets) were downloaded from the addresses the dev store prints and compared byte for byte with the files in the app's repository. Each case below ran in a fresh browser profile unless it says same profile. The gate was read from the page after 2.5 seconds.
- The rule
- One age gate: minimum age 21, method confirm (one case: date of birth), remembered 30 days, no redirect, default wording.
- The script
- Cartkept Consent version cartkept-consent-5 as the dev store served it. All four files matched the app's repository byte for byte: ck-style.css, consent.css, ck-style.js, consent.js.
- Not tested
- a live store or its theme; the real theme editor or a real theme preview (both were simulated with the switches the script reads); the redirect on decline (covered by the app's own test file only); Safari, Firefox or a phone's own browser; screen readers; what any law requires of a store.
Keep reading
- Cartkept ConsentA cookie banner, an age gate and a notice in one app, matched to your theme.
- Shopify cookie banner: what Accept and Reject doThe cookies before an answer, after Accept and after Reject, on a dev store.
- Shopify cookie policy: what a store really setsShopify's published cookie list against the cookies one dev store set.