Squarespace
1. Add the script
Squarespace only allows code injection on its higher plans; check yours includes it.
In Sourcream, open Sites, your site, Install and copy the script tag.
In Squarespace, open Code injection (under Settings, then Advanced or Developer tools, depending on your Squarespace version) and paste it into the Header box:
<script src="https://cdn.sourcream.ai/t/YOUR_SITE_KEY.js" async></script>Save. The script runs on every page of the live site (not inside the Squarespace editor).
If you test on the *.squarespace.com address before connecting your domain, add that host under the site's Own domains in Sourcream and leave Cookie domain empty for it. It does not count towards your plan's domains.
2. Forms: what works and what does not
Squarespace form blocks are rendered and submitted by Squarespace's own code, which only sends the fields defined in the block. Squarespace's own hidden fields are filled from SQF_ parameters in the page address, not by scripts. So the hidden values Sourcream adds to forms do not reach Squarespace's form storage, its email notifications or its Zapier connection. This is a limit of Squarespace form blocks.
What does work:
- Lead capture. When a visitor submits a form block, the script reports the lead to Sourcream with its full attribution and (with Capture mode Email, the default) the email address and name. Sourcream delivers it to HubSpot, Salesforce, Pipedrive or your webhook, matched by email. Submit a test and check Leads in Sourcream: if a form type on your site does not trigger a capture, tell us at [email protected].
- Embedded forms. HubSpot forms and Typeform embeds added with a code block work as described in their guides: HubSpot, Typeform and Gravity Forms. With a Typeform embed, write
deferinstead ofasyncin the Sourcream tag in Code injection. Forms that load inside an iframe cannot be filled or watched by any script on your page, so Sourcream cannot attribute their submissions. - Custom code forms. A plain HTML form in a code block gets the hidden fields like on any other site.
3. Standard mode only
Squarespace hosting cannot proxy a path, so Squarespace sites run in standard mode. First touch is stored on our servers against the visitor ID, but Safari limits the visitor ID cookie to 7 days: a Safari visitor who returns after more than 7 days without a new campaign click starts a new visitor record. See First-party proxy.
Check it
Open the live site in a private window with ?utm_source=test&utm_medium=test&utm_campaign=squarespace, run Sourcream.read() in the browser console, submit a form and check Leads in Sourcream.
Questions: [email protected]