Installation
Install SourceTag on Squarespace
Add SourceTag’s tracking script to your Squarespace site through the built-in Code Injection settings. No third-party apps or extensions needed.
Step 1: Copy your script tag
In your SourceTag dashboard, go to your site’s detail page and copy the script tag. It looks like:
<script src="https://cdn.sourcetag.io/scripts/YOUR_SITE_ID/st.js" async></script> [IMAGE: Screenshot of the SourceTag dashboard showing the script tag on the site detail page]
Step 2: Open Code Injection
- In your Squarespace dashboard, go to Settings
- Click Advanced
- Click Code Injection
[IMAGE: Screenshot of the Squarespace Settings menu with Advanced > Code Injection highlighted]
Step 3: Paste the script tag
- In the Header section, paste the script tag you copied from SourceTag
- Click Save
[IMAGE: Screenshot of the Squarespace Code Injection page with the SourceTag script tag pasted in the Header field]
The script will now load on every page of your Squarespace site.
Step 4: Publish
If your site is already live, the change takes effect straight away. If you’re working on an unpublished version, publish your site to make the script active.
Step 5: Test
Visit your live site with UTM parameters in the URL:
https://yoursite.com/?utm_source=test&utm_medium=cpc&utm_campaign=squarespace-test Open your browser’s developer tools (F12 or Cmd+Option+I on Mac) and check:
- View page source or the Elements panel to confirm the script tag is in the
<head> - Application > Cookies to confirm a
_sourcetagcookie has been created - Submit a form on your site. Check the form notification in Squarespace. The submission should include hidden fields with attribution data like
st_fc_channelandst_lc_channel.
[IMAGE: Screenshot of browser developer tools showing the _sourcetag cookie]
Notes
- The script works with Squarespace’s native form blocks. Hidden fields are added automatically when a form is detected on the page.
- If you’re embedding a third-party form (Typeform, HubSpot, etc.) on a Squarespace page, the script will detect those too via MutationObserver.
- Browser cookies are limited to 7 days on Squarespace. There’s no server-side cookie workaround available for Squarespace sites. See Safari Cookies for more detail.
- Code Injection is available on Squarespace Business and Commerce plans. If you’re on a Personal plan, you’ll need to upgrade to access this feature.