Add the selector to a Shopify store
Tested by us on a real site, last checked 2026-08-04.
No app to install. You paste one line into your theme.
Copy the snippet from Settings, then Selector, in your project.
Where the snippet goes
- In your Shopify admin, go to Online Store, then Themes.
- Your published theme sits at the top of the page with a Current theme badge. That is the one to edit. A draft theme serves nobody.
- Back it up first. On that theme, click the horizontal menu icon (the small button at the right of the row, no text label) and choose Duplicate. The copy is named "Copy Of" plus your theme name and stays unpublished. It is your way back.
- Open that same menu again on the current theme and choose Edit code.
- In the file directory on the left, open the
layoutfolder, thentheme.liquid. - Find
</head>and paste the snippet on its own new line immediately above it. Leave{{ content_for_header }}exactly where it is. Shopify requires it inside<head>. - Save (or
Ctrl+S,⌘+Son Mac). There is no separate publish step: you edited the current theme, so it is live the moment it saves.
The trap on Shopify
Your edit lives in one theme, not in your store. Content and settings managed through the theme editor and the code editor are unique to each theme.
So the day you publish a different theme, a seasonal one, a theme you just bought, an agency's rebuild, the snippet stays behind in the old theme and the selector disappears from your store. Nothing in the admin connects the two events, which is what makes this one expensive. Your old theme is not lost (publishing moves the previous one to Draft themes), but the snippet does not travel with the change.
After publishing any theme, redo steps 4 to 7 on the new current theme.
Theme updates are the milder version of the same thing: if your code edits conflict with an update, they are removed.
How to know it worked
Open your store and view the page source, then search for ut/v1.js. One match means the
snippet is live. No match usually means the edit went into a theme that is not the one
carrying the Current theme badge.
The check on the Selector settings screen turns green on its own. Give it a minute after saving, so a red check straight away means "not yet", not "it failed".