Add a TrustBox using Google Tag Manager

This feature is included in the Free plan

Get started now

If you want to add a TrustBox to your website but have limited access to the source code, you can use Google Tag Manager (GTM) to add the widget as a custom script. This guide shows you how to do it.

GTM allows you to add a TrustBox to your website as a custom script. You'll use GTM to create a new Custom HTML tag, add the TrustBox code, then position it on the web page.

Check that you've set up GTM correctly on all the web pages where you’d like to display TrustBoxes. If you need help, refer to Google’s GTM support article.

Note: You should have basic knowledge of HTML to use Google Tag Manager.

How to do it 

  1. In Trustpilot Business, go to Showcase > Website widgetsSelect your TrustBox, then click Get code
  2. Log in to your Google Tag Manager account and create a new Custom HTML tag.
    Google Tag Manager's platform highlighting Custom HTML to select
  3. Your TrustBox appears at the bottom of the page by default. There are two ways to change its placement: 
    • If you have access to the HTML of your page, add a TrustBox placeholder container, for example, <div id="trustbox"/>. Use GTM to insert the TrustBox in the placeholder container.
    • Find an existing container in your HTML source and refer to its ID or class property in GTM to insert the TrustBox. In the example below, you'd refer to the "customer-experience" element as your widget's container in GTM. HTML code example for existing container
  4. In the Tag Configuration panel, paste the TrustBox code and wrap it inside a JavaScript function.
    • Replace the HTML_ID placeholder with the ID of the container you chose in step 3.
    • Replace the TRUSTBOX_HTML placeholder with the TrustBox's HTML code. It's the code with the <div> element.
     (function () {
      var containerId = 'HTML_ID';
      var trustboxContainer =
       document.getElementById(containerId) ||
      if (trustboxContainer) {
       var trustbox = document.createElement("div");
       trustbox.innerHTML = 'TRUSTBOX_HTML';
    <!-- TrustBox script -->
    <script type="text/javascript" 
    src="//" async></script>
    <!-- End Trustbox script -->
    Important: Always add the bootstrap script right after the HTML code.
  5. Under Triggering > Firing Triggers, add a DOM Ready trigger as a firing trigger. Google Tag Manager platform for adding a DOM ready trigger as a firing trigger
  6. Create a new version in GTM and publish your changes.

Previous Introduction to TrustBoxes

Up next TrustBoxes - FAQ