Add OptionKit with Code Injection
OptionKit is a short piece of code in your site’s footer (the bottom of every page). You paste it once into Code InjectionA box in Squarespace’s settings where you paste code that runs on every page of your site., a box in Squarespace’s settings for code that runs on every page of your site. After that, every change is one UpdateThe builder button that puts your latest options on your store, after your first Publish. It’s grayed out when your store is already up to date. in the builder.
Setting up · part 2 of 4
Updated October 2026 · Squarespace 7.1
Your site code
The builderThe OptionKit web page where you create your options and see a live preview. It has two tabs: Options, where you build, and Setup, with the Setup guide for putting OptionKit on your store. gives you your site codeThe short code you copy from step 1 of the Setup guide and paste into Code Injection, once. It switches OptionKit on for your store. on the Setup tab, in step 1, Add OptionKit to your site.
The code appears once you’ve connected your store: on the Setup tab, under Connect your store, enter your Squarespace website URL and Your email, check I agree to the Terms of Service and the Privacy Policy, and select Send verification code. We email you a 6-digit code. Type it into the six boxes. If you’re already signed in, there’s no code. Step by step: Get started, part 3.
You don’t need to understand this code. Copy it from the builder and paste it. Your own copy has your site’s code where this one says site_…. It looks like this:
<!-- OptionKit by JuiceKit (getjuicekit.com). -->
<script src="https://cdn.getjuicekit.com/juicekit/1/juicekit.min.js" data-site="site_…" defer></script>
It’s a short note that says what it is, then the code itself. Use Copy code to get both, and paste them together. Code you pasted earlier, with the older note above it, keeps working.
Where to paste it
- Step 1’s sentence reads “Paste your site code into Squarespace’s Code Injection ↗, in the Footer box, and save.”: Code Injection ↗ in it opens Code Injection for your site. Or, in Squarespace, open Pages. At the bottom of the Pages panel, select Custom Code › Code Injection.
- Paste your site code at the end of the Footer box. Leave any code that’s already there as it is.
- Is there an older OptionKit install code in the box? Delete it before you paste your site code: everything from the
<script>tag that haswindow.OptionKitConfigin it to its closing</script>tag. - Save appears at the top left once you’ve typed. Select it.
- Come back to the builder. Step 1 marks itself done once a page of your site opens with the code, says ✓ On yourstore.com · checked just now, and the next step opens. Until then its box says Looking for OptionKit on your site…, with Paste it in Squarespace and save, then come back here. · Check now under it: select Check now to look at once. Not found? Check the code is in Footer and that you selected Save. On a private site (not public yet, or behind a password), open it while logged in to Squarespace. Still nothing after a couple of minutes? The step says Not showing up? Check your store to see why. with Check my store, which checks everything on your store.
The whole site’s Footer, not one page’s. A single page has a Code Injection box of its own, in that page’s settings under Advanced. Your site code doesn’t belong there: it has to run on every page, the cart page included, or OptionKit can’t check the cart.
Already had OptionKit before?
- Is there an older OptionKit install code in the Footer box? It has
window.OptionKitConfignear its start. Delete all of it, from its<script>tag to its closing</script>tag, and paste your site code instead. Step 1 says so too: “Your store has the old install code, not your site code. Replace the old code in Code Injection with your site code, then select Save.” - Is there OptionKit’s earlier one-line code? It has
…/optionkit/2/optionkit.min.jsanddata-site=…in it. It keeps working. Replace it with your site code when you like. - Moving an older install online: open the builder, use Already have a backup? Open it. under the templates, paste the old code, and choose Move this setup online. The builder loads it and opens Connect your store. Connect your store the normal way (website, email, the 6-digit code), paste your site code, and Publish puts the setup on it. Nothing is made online before that.
Questions
I don’t see Code Injection.
Code Injection is part of Squarespace 7.1 sites. It’s at the bottom of the Pages panel, under Custom Code. Don’t see it? The Basic plan doesn’t have Code Injection. Squarespace has moved it before: if your plan has it but it isn’t there, search Squarespace’s own help for “Code Injection” to see where it is today. On a Squarespace 7.0 site (the older site versionSquarespace’s two site versions. OptionKit works on 7.1, which nearly all newer sites use.), OptionKit stays off, and the check says so.
Does it slow my site down?
OptionKit is one small script that loads after your page, so your page appears first. How quickly it loads depends on the page and the connection.
What if OptionKit can’t load?
Customers who visited before still see your options, from a copy saved in their browser. A new customer sees your products, and Add To Cart says “The options couldn’t load. Please try again.” Nothing is added without its options, unless the customer’s browser blocks scripts: then the product can be added on its own.
Do I need to paste it again after changes?
No. Your site code stays the same. The builder’s Update sends your changes to your store.
How do I remove OptionKit?
Delete your site code from Code Injection and save. Your store goes back to normal at once. You can keep the products for your paid options or delete them.
