Articles on: Online store
This article is also available in:

Integrate Trustpilot with your store

Trustpilot is an online review community created for online businesses. Setting up Trustpilot on your store allows you to collect product and service reviews from customers via email after they complete their purchases. In this article, we will walk you through the process of integrating Trustpilot into your store.

In this article

A. Integrate Trustpilot with your store
B. Verify results

A. Integrate Trustpilot with your store

Follow Trustpilot's Implement Trustpilot's JavaScript integration guide to get the JavaScript code from Trustpilot. You can skip the Complete your setup step in Trustpilot and continue with ShopBase guides below to complete your Trustpilot setup and integration with your ShopBase store.

From your ShopBase admin site, go to Online store > Preferences, paste the copied code from Trustpilot to Head section.

To get the required variants from ShopBase, paste the code below after the Trustpilot script and before the closing tag </script>.

        window.sbsdk.checkout.onCompleteOrder(function(payload) {
            const order = window.sbsdk.checkout.getOrder();
            let productSkus = [];
            let products = [];
            for (let item of order.items) {
            for (let item of order.items) {
                const url = + '/products/' + item.product_title.trim().replaceAll(' ', '-');
                    sku: item.product_sku,
                    name: item.product_title,
                    imageUrl: item.image,
                    productUrl: url
            const trustpilot_invitation = {
   		    	recipientName: window.sbsdk.checkout.getOrder().shipping_address.first_name,
   			    referenceId: 'Order ' +,
   			    source: 'InvitationScript',
   			    productSkus: productSkus,
   			    products: products,
  		    tp('createInvitation', trustpilot_invitation);

The final result should look like this
Click Save.

Refer to this article for more information on our built-in Product review app and how to import reviews to your store.

B. Verify results

After completing all the steps in section A to integrate Trustpilot with your store, you can test the results to see if everything is working properly by following the steps below:

In Trustpilot Business, go to Settings > Time & delivery.

In Send a service review invitation, choose 0 days after your customer's order.

After you've verified the integration's results, you can adjust this setting back to your preference.

Place a test order on your store. Please refer to this article on how to place a test order on ShopBase, and this article on how to do so on a PrintBase store.

After your order is completed, a review email as below will be sent to your order email to show that the integration is successful.

Now it is ready to automatically send customers a review invitation after a purchase from your store.

Add codes of other tracking tools to ShopBase store
Overview of Preferences
Overview of Product reviews

Updated on: 10/03/2023

Was this article helpful?

Share your feedback


Thank you!