Embedding a Trustpilot widget in your site

Framer offers a built-in component, but you can also integrate a Trustpilot design into your website by following these steps.

Add the Trustpilot script to your site settings

Place the first Trustpilot script in the Custom Code section at the start of the <head> tag in your site's general settings.

<!-- TrustBox script -->
<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async></script>
<!-- End TrustBox script -->
A settings interface titled 'Custom Code,' allowing users to add custom code and scripts to every page of a website. The section displays a code block labeled 'Start of tag,' containing a TrustBox script from Trustpilot.

Retrieve and edit the Trustpilot widget script

From your Trustpilot account, copy the second script and paste it into a text editing tool like TextEdit (Mac) or Notepad (Windows). Extract the following elements:

  • data-template-id (e.g., 5407e68dz0d06a09e041d5km)

  • data-businessunit-id (e.g., 5c09c4742068df0001rrfd35)

  • Your Trustpilot review URL (e.g., https://www.trustpilot.com/review/yourdomain)

Replace the placeholders in the script below with your own data:

<!-- TrustBox widget - Horizontal -->
<div id="trustbox" class="trustpilot-widget" data-locale="en-US" data-template-id="your-data-template-id" data-businessunit-id="your-business-unit-id" data-style-height="28px" data-style-width="100%" data-theme="light">
  <a href="your-URL" target="_blank" rel="noopener">Trustpilot</a>
</div>
<script>var trustbox = document.getElementById('trustbox');
 window.Trustpilot.loadFromElement(trustbox);</script>
<!-- End TrustBox widget -->

Add an embed component to your canvas

Next, navigate to the Insert menu and search for "embed". Then, drag the component onto the canvas.

The left panel shows six element options under the 'Elements' category: Calendly, Intercom, Typeform, Hubspot, Tagembed, and Embed, each represented by a distinct icon.

Insert the code into the embed component

Paste all the Trustpilot code into the HTML tab of the embed component.

The right-hand panel contains a large text box is available for inserting custom HTML code.

Still experiencing the issue after following the steps above? Create a support ticket in the Community.