Website Building » Squarespace » How Do I Add a Tracking Code on Squarespace?

How Do I Add a Tracking Code on Squarespace?

Last updated on December 26, 2022 @ 6:59 pm

There are two ways to add tracking codes to your Squarespace website: through the Code Injection tool or through the Header Code Injection tool.

Code Injection

Code Injection is the recommended method for adding tracking codes to your site. It’s quick and easy, and you can add multiple codes without affecting your site’s design.

To inject code:

    1. Go to Settings > Advanced > Code Injection.
    2. Enter your code in the Header Code text box.
    3. Click Save.

Your code will be injected into the header of every page on your site. If you’re adding HTML code, we recommend wrapping it in <code>-</code> tags.

Header Code Injection

Header Code Injection is an older method that we don’t recommend using because it can cause design issues on your site. If you still want to use this method, follow these instructions:

    1. Go to Settings > Advanced > Miscellaneous.
    2. Enter your code in the Header Code text box.
    3. Your code will be injected into the header of every page on your site, including the homepage.

PRO TIP: If you are not comfortable with code, we recommend working with a developer to add your tracking code. Adding code to your site can create issues if done incorrectly.

When using either method, if you’re unsure whether your code was added correctly, you can check for errors by opening your site in a web browser and viewing the source code.

Conclusion:
Adding a tracking code on Squarespace is simple and easy to do. You can either use the Code Injection tool or Header Code Injection tool to add your tracking code onto your website pages

Dale Leydon

Dale Leydon

Sysadmin turned Javascript developer. Owner of 20+ apps graveyard, and a couple of successful ones.