Install on Squarespace
Squarespace has two places for code that work with Voxtrics surveys: Code Injection for a popup, a popup with no button or a chat survey on every page, and the Code block for an inline form placed on a page. Both run scripts only on the Core, Plus and Advanced plans and some older plans.
Before you start
- In Domains, add the domain your Squarespace site opens on,
for example
example.com, or its Squarespace address such asyour-site.squarespace.com. A survey loads only on the domain it belongs to. - Create the survey under that domain and publish it.
- Copy the survey's ID: on the Surveys list, open the
survey's embed code. The ID is the
formIdvalue.
Popup, popup with no button or chat: Code Injection
-
In your site's editor, open Pages, scroll down to Website Tools and click Code Injection.
-
In Footer, paste this, with your survey's ID in place of
YOUR_SURVEY_ID:<script src="https://feedback.voxtrics.io/assets/prod/index.iife.js"></script> <script> window.SiteUtilsFeedback.initiateFeedbackModule({ formId: 'YOUR_SURVEY_ID' }); </script> -
Click Save.
Inline form: the Code block
-
Open the page, click Edit, then Add Block in the section where the survey should appear.
-
Search for Code and add the Code block.
-
Click the pencil icon on the block and choose HTML in the Type menu. Not JavaScript: a Code block set to JavaScript shows the code as text instead of running it.
-
Paste your survey's embed code, with your survey's ID in place of
YOUR_SURVEY_ID:<div id="feedback-widget"></div> <script src="https://feedback.voxtrics.io/assets/prod/index.iife.js"></script> <script> window.SiteUtilsFeedback.initiateFeedbackModule({ formId: 'YOUR_SURVEY_ID', container: document.getElementById('feedback-widget'), }); </script> -
Click Save in the top left corner.
Squarespace's own guide to the Code block and its editor: Code blocks.
If the survey doesn't appear
- Check that the survey is published and belongs to the domain your site opens on. A domain added as
example.comcoverswww.example.comtoo, but notyour-site.squarespace.com. - Squarespace doesn't run custom code on checkout pages, so a survey won't show there.
- On-site and email surveys aren't placed on a site. Share their link instead.