Jump to content

Trustpilot Invitations with Order Status Page

Go to solution Solved by paul2009,

Recommended Posts

A question about Trustpilot service reviews? Since the new Order Status Page has been introduced on Squarespace I've not been able to send out any automatic Trustpilot invitations. Invitations were sent when script was inserted in the old order confirmation page but as I understand it, this is now for gift certificates etc and the order status page is for physical products which applies to me.

I clicked on 'I've migrated the code' to tell Squarespace that I'd done what was requested.

The script inserted is as follows and I've added
{.if firstPageView}
{.end}
to the order status page to try and ensure the code fires only once and not if customers return to that page in order to check on despatch etc.

Incredibly grateful if you have any help you could offer.
Thank you.

HEADER
<script>
        (function(w,d,s,r,n){w.TrustpilotObject=n;w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)};
            a=d.createElement(s);a.async=1;a.src=r;a.type='text/java'+s;f=d.getElementsByTagName(s)[0];
            f.parentNode.insertBefore(a,f)})(window,document,'script', 'https://invitejs.trustpilot.com/tp.min.js', 'tp');
            tp('register', 'MY KEY HERE');
</script>

 

ORDER STATUS PAGE
 <script>
    function sendTpInvitation () {
    var trustpilot_invitation = {
    recipientEmail: '{customerEmailAddress}',
    recipientName: 'Alex',
    referenceId: '{orderId}',
    source: 'InvitationScript',
    };
    tp("createInvitation", trustpilot_invitation);
}
if (tp) {
    sendTpInvitation ();
} else {
    document.addEventListener ("DOMContentLoaded", function () {
    });
    }
</script>
{.end}

Link to comment
  • Solution
2 hours ago, danielcul said:

Since the new Order Status Page has been introduced on Squarespace I've not been able to send out any automatic Trustpilot invitations.

As I mentioned in another thread, the code in the header and footer injections won't load for the Order Status page like it did for the Order Confirmation page, so you'll need to add the script that you had in the header to the order status page injection area so that it runs before the second part.

As I have mentioned elsewhere, further changes to the order status page are likely, so this situation may change in coming weeks and months.

Edited by paul2009

About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment
On 3/8/2023 at 8:39 PM, paul2009 said:

the code in the header and footer injections won't load for the Order Status page like it did for the Order Confirmation page, so you'll need to add the script that you had in the header to the order status page injection area so that it runs before the second part.

Thank you Paul, incredibly grateful for this. Service reviews are now pending once again. Brilliant.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.