There are a number of Dotdigital scripts you can add to your site through your Content Management System (CMS), which allow you to collect and transfer data, and trigger certain actions, across both systems.
Learn more about the available scripts in Integrate Dotdigital with your CMS.
Before you start
Things you need to know:
Squarespace support adding client-side code to your site. The options available to you to do this depend on your plan.
Squarespace consider adding custom code to your site to be an advanced modification which falls outside the scope of their support. They suggest the following if you require further assistance adding custom code to your site:
If you’re experienced with coding, but need help or advice, visit the Squarespace Forum.
If you have built three or more active Squarespace sites, you can join the Squarespace Circle, where other community professionals may be able to answer your queries.
If you don’t have the team members in-house who can add custom code to your site, you can hire a Squarespace Expert.
Add scripts to your Squarespace site
You can add custom scripts to your entire site, or to specific site pages, using code injection.
Add code to code injection
Log in to your Squarespace account.
Open the Code Injection panel.
Add your code snippet or script to the Code Injection field for the:
header
Code is injected to the<head>
tag of every page on your site.footer
Code is injected before the closing <body> tag of every page on your site.lock page
This page appears when content on your site is hidden behind a site-wide or page-specific password.order confirmation page
Code added here is injected into the order confirmation page that appears after a customer checks out with gift cards, memberships, and subscriptions.order status page
Code added here is injected into the confirmation page that displays after a customer checks out with physical, download, and service products.
Select Save.
Per-page code injection
To inject code into a specific site page:
In the Pages panel, hover over the page you want.
Select the cog icon.
Select Advanced.
Add your code snippet or script to:
Page Header Code Injection
Adds code to the<head>
tag of the page.For blog pages, Post Blog Item Code Injection
Adds code to every blog post.
It’s also possible to add JavaScript and other custom code to Squarespace site pages using Code Blocks.
See also
Learn more about adding custom code to your Squarespace site in their support documentation: