Insert code into your store's head
Add verification tags, analytics or other scripts to your store without editing the theme code, with the XO Insert Code app or a Shopify custom pixel.
Applies to: All Krown themes. Last checked: 2026-10-13.
Verification tags, analytics and other scripts often ask for code in your store's head (the <head> part of every page). You do not need to edit the theme for this. An app or a Shopify custom pixel keeps the code outside the theme files, so it stays when you update the theme.
Where to find it: Shopify admin → Apps → XO Insert Code, once the app is installed; custom pixels in Shopify admin → Settings → Customer events
Add code with XO Insert Code

XO Insert Code is a free app that adds JavaScript, CSS, HTML or meta tags to your store, on every page or on chosen pages, products or collections. Use it for verification tags, analytics or marketing scripts.
Install the app
Install XO Insert Code from the Shopify App Store.
Choose the head area
Open the app and choose the header (head) area for your code.
Paste the code and save
Paste the code you received (a meta tag or a script) and save it in the app.
Check it on your storefront
Open your store and view the page source. The code is in the head.
Every script you add makes your store load a little more. See Understand your store speed. Krown support does not debug third-party scripts: contact whoever gave you the code.
Should I add tracking code as a custom pixel?
Yes, for tracking scripts that follow customer events such as page views, add to cart and checkout.
Add the pixel
Open Shopify admin → Settings → Customer events and select Add custom pixel. Give it a name.
Paste the code and connect
Paste the tracking code, select Save, then select Connect.
- Custom pixels run in a sandbox: they can track events but cannot change the page.
- They follow your customers' cookie consent.
- For Google and Meta, use their own Shopify apps (Google & YouTube, Facebook & Instagram), which set up tracking for you.
- Verification meta tags still belong in the head, with an app such as XO Insert Code.
Is the code kept when I update the theme?
Yes, with an app or a custom pixel: the code lives in the app or in Shopify, not in the theme files. Code pasted into layout/theme.liquid by hand is a code edit, which Shopify copies to a new version only when it does not conflict. See Update your Shopify theme.
Related pages
- Edit the theme code: where the theme files are.
- Understand your store speed: how scripts affect loading time.
- Cookie consent popup: customer consent for tracking.
Connect Mailchimp
Krown themes save newsletter sign-ups as Shopify customers. Connect Mailchimp with its Shopify app to send those contacts to your Mailchimp audience.
Understand your store speed
What Shopify's store speed report measures, how much your theme and apps affect it, and what you can do to make your store faster.