Skip to main content

Install on Squarespace

Squarespace lets you paste site-wide custom HTML through Code Injection. The Pay4Feedback widget snippet drops in there cleanly.

Plan requirement

Code Injection requires a Business plan or above (Commerce Basic, Commerce Advanced, etc. all qualify). Personal-tier sites can't add third-party scripts site-wide. If you're on Personal, upgrade or use a different surface (e.g. embed the widget only on a single page via the Code Block option — see Per-page install below).

  1. In your Squarespace dashboard, open Settings → Advanced → Code Injection.

  2. Find the Footer section.

  3. Paste the snippet you copied from the Pay4Feedback dashboard's Deploy the widget → Direct HTML embed step:

    <!-- Pay4Feedback Widget -->
    <script src="https://app.pay4feedback.com/feedback-agent.iife.js"
    crossorigin="anonymous" async></script>
    <script>
    window.addEventListener('DOMContentLoaded', function () {
    window.FeedbackAgent.init({
    tenantId: 'YOUR_TENANT_ID',
    apiKey: 'p4f_live_...',
    baseUrl: 'https://app.pay4feedback.com',
    campaignId: 'YOUR_CAMPAIGN_ID',
    trigger: { type: 'time', value: 10 }
    });
    });
    </script>
  4. Click Save.

That's it. The widget appears on every page of your site, per its trigger rules.

Per-page install

If you only want the widget on specific pages (e.g. only on a long-form article):

  1. Open the page you want to add it to.
  2. Click + to add a new block, choose Code.
  3. Paste the same snippet inside the Code Block.
  4. Save and publish.

The block renders inline at that location on the page. The widget itself is still a floating overlay, so the visual position of the Code Block doesn't matter — what matters is which pages contain it.

Squarespace Commerce: post-purchase trigger

For Squarespace Commerce stores, you can trigger the widget on the order-confirmation page. Squarespace lets you customise the order confirmation via Commerce → Customer Notifications → Order Confirmed → Edit Email & Page. There isn't a server-side hook the widget can subscribe to, but the URL pattern /checkout/order-confirmed/... is stable. Add a small script to your Footer Code Injection that triggers FeedbackAgent.show() only on that path:

<script>
if (location.pathname.startsWith('/checkout/order-confirmed/')) {
var t = setInterval(function () {
if (window.FeedbackAgent) {
clearInterval(t);
window.FeedbackAgent.show();
}
}, 250);
}
</script>

Combine with the standard widget snippet (configured with trigger: { type: 'manual' }) so the widget loads on every page but only opens after a successful checkout.

Troubleshooting

"I pasted the code but nothing happens"

  • Did you click Save? Code Injection has a separate Save button at the bottom of the page.
  • Is the page published? Squarespace previews the editor differently from the live site; always check on the public URL in an incognito window.
  • Are you on a free trial that just expired? Code Injection is disabled if your site reverts to Personal plan.

"Snippet shows up as plain text on the page"

You probably pasted the snippet into a regular Text Block, not the Code Injection panel or a Code Block. Squarespace treats text blocks as content and HTML-escapes them. Move the snippet to Settings → Advanced → Code Injection → Footer.

If the built-in Cookies & Visitor Data banner is enabled, Squarespace won't block the widget script, but you'll have two consent surfaces on the page (Squarespace's banner + whatever Pay4Feedback shows on first feedback submission). Either disable Squarespace's banner under Settings → Cookies & Visitor Data or handle consent server-side via your own cookie banner.