Turn Your Store into Mission Control.
Shopify tells you what sold. It's much quieter about the carts that filled up and then went nowhere. Grain closes that gap: a single script in your theme captures how visitors move through product pages, collections, and the cart, and records the sessions where they hesitated or left. There's no official Shopify app, so the honest, reliable path is a one-line snippet in theme.liquid — we'll be straight with you about what that covers and where Shopify's checkout limits actually bite. Grain is cookieless and EU-hosted, so it runs without a consent banner throttling your data, and Kai turns the abandoned-cart sessions into a plain answer about why people bailed.
The Setup
Open your theme code
In your Shopify admin, go to Online Store → Themes, find your live theme, and click the three-dot menu → Edit code. This opens the theme editor where you can add the Grain tag directly to the layout that wraps every storefront page. Working on a duplicate of your theme first is a sensible habit before you touch the live one.
Add the Grain snippet to theme.liquid
Open Layout → theme.liquid and paste <script src="https://tag.grainql.com/v4/YOUR_TENANT_ID.js" async></script> just before the closing </head> tag. Grab YOUR_TENANT_ID from your Grain dashboard first — it scopes the data to your store's workspace. Because theme.liquid wraps every storefront page, this one placement covers your home page, collections, product pages, and cart in a single edit. Save, and the tag is live.
Track the path to the cart
Once the tag is live, Grain records how shoppers actually browse — which collections they open, which products they linger on, how they move between listing and detail, and when they add to cart. This is the behavior Shopify's native reports flatten into totals: you'll see the sequence, not just the sum, which is what tells you whether a product page is doing its job or quietly losing people.
Watch product-page sessions with replay
Grain's session replay lets you watch a real visit to a product page: the scroll that stopped short of the reviews, the size selector nobody clicked, the image gallery they never swiped. Instead of guessing why a high-traffic product converts poorly, you watch a handful of sessions and the friction becomes obvious. Pair a few replays with the funnel numbers and you usually spot the leak within minutes.
Understand the checkout-extensibility limit — honestly
Here's the honest caveat: Shopify locks down the checkout itself. Injecting scripts into the checkout pages (via checkout.liquid or Additional Scripts) is a Shopify Plus feature only. If you're not on Plus, theme.liquid head injection is the correct and supported path — it tracks everything up to and through the cart. You'll capture the drop-off into checkout, which is where most stores lose money anyway; you just won't get step-by-step events inside Shopify's hosted checkout unless you're on Plus. We'd rather tell you that up front than let you expect data Shopify won't hand over.
Confirm the green light and cookieless setup
Open your Grain dashboard and look for the pulsing green indicator next to your store's domain — green means events are flowing. Browse a product and add it to cart on your live store, then watch those events land in real time. Grain is cookieless by default and EU-hosted, so it typically runs without the analytics-cookie consent GA demands, meaning you see far more of your real traffic rather than only the consented slice.
Look for the "Green Light"
Once installed, head over to your Grain Dashboard. A pulsing green indicator next to your domain means data is flowing precisely as it should.
Key Benefit
"Shopify's native analytics give you sessions, conversion rate, and a sales total. Grain gives you the replay of the cart someone abandoned, the product page where they stalled, and Kai naming the reason — so you fix the leak instead of refreshing the dashboard."
"Kai, why are people abandoning their carts on mobile?"
Grain captures the behavior leading into the cart, so Kai can answer cart-abandonment questions with specifics instead of a shrug — the device, the referral source, the product, and the exact point in the flow where mobile visitors dropped. Ask it which channel brings your highest-spending customers, or which product page bleeds the most sessions, and it correlates acquisition with real value. When you need the full teardown, Deep Investigation runs a six-phase audit across your funnel and reports back where the revenue is going missing.