Shopify Headless Storefront: How Clever Cookie Gets Thousands of Monthly Visitors Without Shopify's Theme
Case study: how I built Clever Cookie a custom SvelteKit headless storefront with Shopify backend and TikTok Shop integration for better performance and sales.
When Clever Cookie first came to me, they had a standard Shopify store. It worked, sure, but it was slow, looked like every other cookie business online, and they were struggling to stand out in a competitive market. Fast forward to today, and clevercookie.uk pulls in thousands of monthly visitors, loads in under a second, and seamlessly integrates with TikTok Shop — all while still using Shopify as the backend.
Here’s exactly how I built it and why headless was the right call.
The Problem with Shopify’s Standard Themes
Don’t get me wrong — Shopify is a brilliant platform. The checkout is rock solid, the admin panel is intuitive, and the ecosystem of apps is massive. But Shopify’s theme system has real limitations.
Clever Cookie had specific needs that a standard Shopify theme couldn’t deliver:
- Speed: Their audience was heavily mobile, coming from TikTok and Instagram. Every millisecond of load time matters when someone’s tapping through from a 15-second video.
- Brand experience: Cookie businesses are everywhere. The website needed to feel premium and unique, not like a tweaked version of Dawn.
- TikTok Shop integration: They needed their product catalogue synced with TikTok Shop, which is easier to manage when you control the frontend layer.
- Content flexibility: They wanted to blend blog content, recipes, and products in ways that Shopify’s Liquid templates make awkward.
What “Headless” Actually Means
If you’re not familiar with the term, headless commerce simply means separating the frontend (what customers see) from the backend (where orders, inventory, and payments are managed).
In Clever Cookie’s case:
- Backend: Shopify handles products, inventory, orders, and checkout
- Frontend: A custom-built SvelteKit application handles everything the customer sees and interacts with
- Connection: Shopify’s Storefront API links the two together
Think of it like a restaurant. Shopify is the kitchen — it processes orders, manages stock, handles payments. The SvelteKit frontend is the dining room — it’s what customers experience. You can completely redesign the dining room without touching the kitchen.
Why SvelteKit?
I chose SvelteKit for this project for several specific reasons.
Performance Out of the Box
SvelteKit compiles components down to vanilla JavaScript at build time. There’s no virtual DOM overhead like React. For an e-commerce site where Core Web Vitals directly affect search rankings and conversion rates, this matters enormously.
Clever Cookie’s site achieves consistent Lighthouse scores above 95 across all metrics. Compare that to most Shopify themes which struggle to break 60 on mobile.
Server-Side Rendering with Edge Deployment
SvelteKit’s SSR capabilities mean product pages are fully rendered on the server before reaching the browser. This gives us two advantages: search engines can crawl every product page properly, and customers see content instantly rather than watching a loading spinner.
Developer Experience
This is a practical consideration that affects the client’s bottom line. SvelteKit is genuinely enjoyable to work with. Less development friction means faster feature delivery and lower costs for the client.
The Technical Architecture
Here’s how the pieces fit together at a technical level.
Product Data Flow
When a customer visits a product page, the SvelteKit server makes a request to Shopify’s Storefront API using GraphQL. The response includes product details, variants, pricing, and availability. SvelteKit renders this into a fully-formed HTML page and sends it to the browser.
For subsequent navigations, SvelteKit handles client-side routing, fetching only the data needed for the new page. This makes browsing between products feel instant.
Cart Management
The cart lives in Shopify via their Cart API, but the UI is entirely custom. When a customer adds an item, we create or update a Shopify cart through the API and store the cart ID in a cookie. The cart drawer, quantity controls, and upsell suggestions are all custom SvelteKit components.
Checkout
This is where Shopify really earns its keep. When a customer is ready to pay, we redirect them to Shopify’s hosted checkout. It’s PCI compliant, supports Shop Pay, Apple Pay, Google Pay, and every payment method Clever Cookie needs. There’s no reason to rebuild checkout — Shopify’s is battle-tested and converting well.
Product Sync with TikTok Shop
TikTok Shop requires a product feed that stays in sync with your actual inventory. Because Shopify manages the inventory, TikTok Shop connects directly to Shopify’s product catalogue. When Clever Cookie updates a price or marks something as out of stock in Shopify, it reflects on TikTok Shop automatically.
The headless frontend doesn’t complicate this at all — in fact, it simplifies things because the Shopify backend remains the single source of truth for all product data, regardless of which channel a customer comes through.
The TikTok Shop Integration in Detail
TikTok Shop has been a game-changer for Clever Cookie. A significant portion of their traffic now comes from TikTok, and the integration needed to be seamless.
How the Flow Works
- A customer sees a Clever Cookie product on TikTok (either through TikTok Shop directly or via a link in bio)
- If they come through the website link, they land on the SvelteKit storefront with UTM tracking
- Product availability and pricing are always accurate because both TikTok Shop and the website pull from the same Shopify backend
- Analytics track the full journey from TikTok to purchase
Attribution and Analytics
With a custom frontend, we have complete control over analytics. We track TikTok-originated visits separately, measure conversion rates by traffic source, and feed this data back into Clever Cookie’s marketing decisions. This level of detail is harder to achieve with a standard Shopify theme and app ecosystem.
Performance Results
The numbers speak for themselves.
Site Speed
- First Contentful Paint: Under 0.8 seconds
- Largest Contentful Paint: Under 1.2 seconds
- Time to Interactive: Under 1 second
- Cumulative Layout Shift: Near zero
These scores are consistently in the green across Google’s PageSpeed Insights, on both mobile and desktop.
Business Impact
Speed translates directly to money in e-commerce. Studies consistently show that every second of load time improvement increases conversions by 7-10%. For Clever Cookie, the combination of speed, brand differentiation, and TikTok integration has driven meaningful growth in both traffic and revenue.
The site now handles thousands of visitors monthly, with peak traffic during viral TikTok moments that would have hammered a standard Shopify theme.
What This Approach Costs
Let’s be transparent about costs, because headless isn’t free.
Development Investment
Building a custom headless frontend costs more upfront than installing a Shopify theme. For a project like Clever Cookie’s, you’re looking at a significantly higher initial investment compared to a theme customisation.
Ongoing Costs
- Shopify plan: Same as before (Basic Shopify is fine since you’re not using the theme)
- Hosting: SvelteKit deployed to the edge costs very little — often free tier or close to it
- Maintenance: Custom code needs a developer for updates, but there are no app subscription fees eating into margins
When It Makes Sense
Headless isn’t for everyone. It makes sense when:
- Your brand needs to stand out visually and you’ve outgrown themes
- Site speed is critical for your audience (mobile-heavy, social media traffic)
- You need custom integrations that apps can’t handle cleanly
- Your monthly revenue justifies the development investment
For Clever Cookie, the investment paid for itself through improved conversion rates and the ability to capitalise on viral TikTok moments with a site that could handle the traffic spikes.
Lessons Learned
Keep Shopify Checkout
Every headless Shopify build I’ve done reinforces this. Shopify’s checkout converts well, it’s trusted, and it handles compliance. Don’t rebuild it.
Cache Aggressively
Product data doesn’t change every second. Caching Storefront API responses for even a few minutes dramatically reduces API calls and improves response times.
Plan for TikTok Traffic Spikes
Social media traffic is spiky. One viral video can send thousands of visitors in minutes. Edge-deployed SvelteKit handles this naturally because there’s no single origin server to overwhelm.
Invest in Image Optimisation
Clever Cookie’s products are visual. We implemented aggressive image optimisation with modern formats (WebP, AVIF) and responsive sizing. This alone knocked seconds off load times on mobile.
Is Headless Right for Your Shopify Store?
If you’re running a Shopify store and you’re frustrated with theme limitations, slow page speeds, or difficulty integrating with channels like TikTok Shop, headless might be worth exploring.
The key question is whether the investment matches your business goals. If you’re doing enough volume that a 10-20% conversion rate improvement would cover the development cost within a few months, it’s likely a smart move.
If you want to talk through whether a headless approach makes sense for your Shopify store, get in touch. I’m always happy to have an honest conversation about whether it’s the right fit — and if it’s not, I’ll tell you that too.
Need help with your website?
I help businesses in Cambridgeshire and beyond build better websites. Let's talk about your project.
Get in touch