This article is also available in:
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.

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


The finished result should look like this
To get the required variants from ShopBase, paste the code below within the tag <script></script>.

window.sbsdk.ready(function(){
window.sbsdk.checkout.onCompleteOrder(function(payload) {
const order = window.sbsdk.checkout.getOrder();
let productSkus = [];
let products = [];
for (let item of order.items) {
productSkus.push(item.product_sku);
}
for (let item of order.items) {
const url = window.location.host + '/products/' + item.product_title.trim().replaceAll(' ', '-');
products.push({
sku: item.product_sku,
name: item.product_title,
imageUrl: item.image,
productUrl: url
});
}
const trustpilot_invitation = {
recipientEmail: order.email,
recipientName: window.sbsdk.checkout.getOrder().shipping_address.first_name,
referenceId: 'Order ' + order.name,
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 Get reviews > Invitation Settings > Timing and frequency.

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.

Related articles

Add codes of other tracking tools to ShopBase store
Overview of Preferences
Overview of Product reviews
Was this article helpful?
Cancel
Thank you!