Website Building » Squarespace » Does Squarespace Allow Custom JavaScript?

Does Squarespace Allow Custom JavaScript?

Last updated on October 1, 2022 @ 6:09 am

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:

  1. Login to your Squarespace account and go to the dashboard of the site you want to add the code to.
  2. Click on the “Settings” icon in the left sidebar and select “Advanced”.
  3. “External Code” under “Code Injection”.
  4. “Header Code” box and paste your code.
  5. “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.
  1. “Page Settings” under “Settings”.
  2. “Advanced” tab and scroll down to the “Page Header Code Injection” section.
  3. >

  4. “Header Code” box and paste your code.”Save” your changes.
  5. >

>

Does Squarespace Allow Custom JavaScript? – Yes, but with some limitations

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.