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"></script> Step 2: Open Code Injection
- In your Squarespace dashboard, go to Settings
- Click Advanced
- Click Code Injection
Step 3: Paste the script tag
- In the Header section, paste the script tag you copied from SourceTag
- Click Save
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.
Notes
- The script works with Squarespace’s native form blocks. You’ll need to add hidden fields to your forms yourself - SourceTag only populates fields that already exist. See Add Hidden Fields for the field names.
- 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 Core plans and above. If you’re on a Basic plan, you’ll need to upgrade to access this feature.
Doesn't answer your question or need more help? Get in touch.
