You can add custom code and scripts to your site using the Code Injection area in Website Settings.
When to use Code Injection
Before you begin
- Creating and adding code to Code Injection is an advanced modification that requires programming knowledge. Squarespace doesn't provide code-based support.
- Code added to Code Injection fields will apply to all your site pages, regardless of any styles or style overrides you're using. Unlike Squarespace 7, Squarespace 5 doesn't support per-page code injection.
- You can add code within the <head> tag using the Extra Header Code field for every Squarespace 5 site. You must be on the Unlimited plan to access all ten code injection points (as shown in the screenshot below).
Step 1 - Open Code Injection
- Log into your site and open the Website Management bar.
- Cick Website Settings under Structure.
- Go to the Code Injection tab.
Step 2 - Add HTML code
Select an Injection Region from the drop-down.
Note: If you're not on the Unlimited plan, you can only access the Extra Header Code injection region.
Paste your code into the HTML Code field.
Step 3 - Save
Click Update Information.
Once you add code to an injection region's code field, the drop-down for that region will include an Edited flag.
Note: Adding or modifying code on your site is an advanced modification. We highly recommend that you have coding knowledge to use Code Injection. While we can't offer more help on this topic, here are some resources to point you in the right direction: