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

  1. In Domains, add the domain your Squarespace site opens on, for example example.com, or its Squarespace address such as your-site.squarespace.com. A survey loads only on the domain it belongs to.
  2. Create the survey under that domain and publish it.
  3. Copy the survey's ID: on the Surveys list, open the survey's embed code. The ID is the formId value.
  1. In your site's editor, open Pages, scroll down to Website Tools and click Code Injection.

  2. 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>
    
  3. Click Save.

Code Injection: paste the code into Footer (1), then Save (2).

Inline form: the Code block

  1. Open the page, click Edit, then Add Block in the section where the survey should appear.

  2. Search for Code and add the Code block.

  3. 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.

  4. 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>
    
  5. Click Save in the top left corner.

Add Block, search for Code (1) and add the Code block (2).

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.com covers www.example.com too, but not your-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.