Trustpilot
Trustpilot provides website widgets, known as TrustBox widgets, that display Trustpilot ratings, reviews and review collection links on a website.
Key features include:
- TrustBox widgets for displaying ratings and reviews
- Review collection widgets for gathering customer feedback
- Script-based loading of Trustpilot widgets
- Page-level embedding of individual TrustBox widgets
Trustpilot integrates with ShopWired by adding a to your theme and embedding widget code on selected website pages to display TrustBox widgets.
Account creation
Account creation
Create a Trustpilot Business account on the Trustpilot website. Trustpilot provides a script and widget embed code that can be added to your website.
Theme installation
Theme installation
All Trustpilot widgets require a script to be added to your ShopWired theme so that TrustBox widgets can load correctly.
An example of the Trustpilot script is shown below:
<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async></script>
The script shown above is provided as an example only. You must copy the exact script provided in your own Trustpilot account, as the script and any ID values will be unique to your website.
Add this code to your ShopWired theme’s master.twig file:
- Navigate to Website > Themes
- Select the
code editoroption for the theme you want to install it on - Open the
master.twigfile - Add the script just above the closing
</head>tag - Select
save changes
This script must be added before any TrustBox widgets can display on your website.
Adding a Trustpilot widget to a page
Adding a Trustpilot widget to a page
Individual TrustBox widgets must be added to the page where you want the widget to appear.
An example of TrustBox widget embed code is shown below:
<div class="trustpilot-widget"
data-locale="en-GB"
data-template-id="YOUR_TEMPLATE_ID"
data-businessunit-id="YOUR_BUSINESS_UNIT_ID"
data-style-height="52px"
data-style-width="100%"
data-token="YOUR_WIDGET_TOKEN">
<a href="https://www.trustpilot.com/review/yourwebsite.com" target="_blank" rel="noopener">Trustpilot</a>
</div>
The code shown above is provided as an example only. You must copy the exact widget code provided in your own Trustpilot account, as the code and any ID values will be unique to your website.
Add this code to a page on your ShopWired website:
- Navigate to Website > Themes
- Select
customise your theme - Select the page where you want the widget to appear
- Select
add a new section - Select the
custom HTMLsection type - Paste the widget code into the Custom HTML setting
- Use the theme editor to position the widget on the page
The Trustpilot widget will now display on the selected page.
Recommendations
Recommendations
- Check that TrustBox widgets load correctly on desktop and mobile devices.
- Confirm the Trustpilot script is added above the closing
</head>tag in themaster.twigfile. - Ensure widget placement does not interfere with page layout or navigation.