Have a question about Trustpilot? Let's find you an answer.

Squarespace Javascript Integration + Trustpilot - Automatic Feedback Service (AFS) Setup

**NOTE: Only for Service reviews.

Squarespace Javascript + Trustpilot AFS integration automatically sends email invitations to your customers after they have service experience or make a purchase. When a customer purchases something from your business, you send them an order confirmation via email. You can read more about AFS here

If you want to use AFS with the Squarespace Javascript integration, you’ll need to use a structured data snippet. This needs to be done via Code Injection in Squarespace. Code block is not possible because you’re not allowed to edit the Order Confirmation Page in Squarespace.

1. Insert the first <script> in the header section.

a. Go to Squarespace Admin (home) > Settings > Advanced > Code Injection.

b. There will be a “header” section. Paste the first script. 

You'll find the script, incl. your key, here.

2. Insert the second <script> in the Order Confirmation Page section.

**NOTE: These are the only variables you could use in Order Confirmation Page.

{orderId}: The unique ID of the confirmed order
{orderSubtotal}: The subtotal of the confirmed order
{orderSubtotalCents}: The subtotal of the confirmed order, in cents
{orderGrandTotal}: The grand total of the confirmed order
{orderGrandTotalCents}: The grand total of the confirmed order, in cents
{customerEmailAddress}:The customer's email address, as it was entered in the "Billing Info" section

Under Code Injection, scroll down to Order Confirmation Page section and paste the second script:

function sendTpInvitation () {
var trustpilot_invitation = {
recipientEmail: '{customerEmailAddress}',
recipientName: 'Customer',
referenceId: '{orderId}',
source: 'InvitationScript',
tp("createInvitation", trustpilot_invitation);
if (tp) {
sendTpInvitation ();
} else {
document.addEventListener ("DOMContentLoaded", function () {

If you’d like more information on how to use this type of structured data snippet with AFS, check out this article.

You might be experiencing longer response times due to high request volumes related to COVID-19. We’ll get back to you as soon as possible. Thanks for your patience.