Add the selector to a Squarespace site
Testé par nous sur un vrai site, dernière vérification 2026-08-04.
Where the snippet goes
- In your site dashboard, open the Pages panel.
- Click Custom Code at the bottom of the panel, then Code Injection. On version 7.0 sites that group is labelled Website Tools instead.
- Paste the snippet into the Header field, the one injected into the
<head>tag on every page of your site. - Click Save. Code injection has no separate publish step of its own, so saving puts the snippet on your live site.
Copy the snippet from Settings, then Selector, in your project.
Judge the result on the live site, not in the editor. Squarespace can switch scripts off in the site preview (a Disable Scripts in Preview control at the bottom of the preview, after which it reports Scripts have been disabled on your site preview), so the selector can be absent from the editor while working perfectly for visitors. Squarespace's own advice is to open the page in a private or incognito window to see your custom code.
Code injection needs the Core plan or higher (Core, Plus, Advanced, and select legacy plans including Business, Commerce Basic and Commerce Advanced). It is not available on the lowest tier. Squarespace lists which plans include it rather than naming the ones that do not, so if you cannot find the setting, check your plan first.
The trap on Squarespace
The selector cannot go inside the mobile menu. Squarespace does not let you edit the mobile menu markup on most templates, so there is nowhere to put the placement element.
Try the picker first: open Settings, then Selector, pick a position, and open your menu inside the picker before clicking the spot you want. If the picked position does not hold, put the selector in your header or footer, or use a floating selector, which needs no position at all. For an exact spot in ordinary page content, add a Code block where you want the selector and paste the placement element from that selector's settings into it.
How to know it worked
Open your published site in a private or incognito window, view the page source, and
search for ut/v1.js. One match means the snippet is live.
The check on the Selector settings screen then turns green on its own. Give it a minute after saving. A red check straight after you click Save means "not yet", not "it failed".