Installation guides
Squarespace
Add ProductLense to a Squarespace site through Code Injection in the site header, on a plan that includes code injection.
Squarespace adds site-wide scripts through Code Injection, which prints into the <head> of every page. Code injection is available only on Squarespace plans that include it, so check your plan first.
Add the script
- In your site, open Settings → Advanced → Code Injection. On newer dashboards the same box is under Settings → Developer Tools → Code Injection.
- Paste the two tags into Header. Replace
SITE_IDwith the id from Settings → Sites in the ProductLense dashboard. - Save.
<script>window.productlense=window.productlense||function(){(window.productlense.q=window.productlense.q||[]).push(arguments)}</script>
<script defer data-site="SITE_ID" src="https://api.productlense.app/a.js"></script>Add your custom domain, and the .squarespace.com address if visitors use it, to the site's hostnames in the ProductLense dashboard.
Verify your installation
- Open the published site in a normal browser window, signed out of Squarespace. Visits from the editor are not a reliable test.
- Open the Live page in the ProductLense dashboard. Your visit appears within a few seconds.
- In the browser's developer tools, the Network tab shows a
POSTtohttps://api.productlense.app/api/ewith status204.
Ad blockers in your own browser may block the request. If the visit does not appear, follow Verify your installation.