Squarespace is a platform that allows users to create beautiful websites without having to write code. While Squarespace does not allow users to directly edit the HTML or CSS of their site, it does allow for some limited customization using JavaScript.
Squarespace allows for two types of JavaScript:
- External JavaScript: This is JavaScript that is not hosted on Squarespace. This can be added to your site via a code block.
This is useful for adding third-party services or embedding external content.
- Inline JavaScript: This is JavaScript that is added directly to the HTML of a page or blog post. This is useful for adding small snippets of code, such as tracking codes.
To add External JavaScript to your Squarespace site, follow these steps:
- Login to your Squarespace account and go to the dashboard of the site you want to add the code to.
- Click on the “Settings” icon in the left sidebar and select “Advanced”.
- “External Code” under “Code Injection”.
- “Header Code” box and paste your code.
- “Save” your changes.
To add Inline JavaScript to your Squarespace site, follow these steps:
PRO TIP: Squarespace does not allow custom JavaScript. Any code you attempt to add will be automatically removed.
- “Page Settings” under “Settings”.
- “Advanced” tab and scroll down to the “Page Header Code Injection” section.
- “Header Code” box and paste your code.”Save” your changes.
>
>
>
Does Squarespace Allow Custom JavaScript? – Yes, but with some limitations