On this page
What this issue is
A TrustBox is the widget Trustpilot gives you to show your star rating or reviews on your own site. It has two parts: a small script from Trustpilot's servers, and an HTML block (a div with a trustpilot-widget class and data attributes) that the script fills in.
The issue is when that fill-in never happens. You see an empty gap, a loading placeholder that never goes away, a link with no stars, or nothing at all.
Why it costs you leads or sales
Reviews sit near the decision point: on product pages, pricing pages and landing pages. When they vanish, visitors lose a trust signal right where they decide whether to buy or fill in a form. Worse, you usually do not notice, because nothing looks like an error to you.
The effect is usually modest rather than catastrophic, which is why it can run for weeks. A blank box can also make a page look unfinished.
- Page loadsHTML and your content appear
- Trustpilot scriptBlocked, delayed or placed wrongly
- Widget rendersStars and reviews never appear
- Visitor trustNo social proof near the CTA
The page loads, but the review widget never renders, so the trust signal is missing at the decision step.
Common causes
| Cause | What you see | Where to look |
|---|---|---|
| Script blocked by ad blocker, privacy tool or consent banner | Empty gap, only for some visitors | Console and Network tab |
| Script placed after the widget runs, or removed by a minify or delay plugin | Widget never initialises | Page source, optimisation plugin settings |
| Wrong or missing data attributes (template ID, business unit ID) | Empty box or error inside the box | Embed code vs Trustpilot Business |
| Content Security Policy blocks Trustpilot domains | Console CSP error | Response headers |
| Widget hidden by CSS, tabs or a lazy-loaded section | Zero-height box | Inspect element |
| Trustpilot profile has too few reviews or widget type needs reviews that do not match filters | Empty render though script loaded | Widget settings in Trustpilot |
How to check if your site has it
Open the page in a private window
Use a fresh window with extensions off, so ad blockers do not hide the cause.
Look for the widget
Scroll to where the TrustBox should be. Note whether it is blank, shows a placeholder or is missing.
Open DevTools and the Console
Press F12 (or Cmd+Option+I on Mac). Look for red errors mentioning trustpilot, widget.trustpilot.com or Content Security Policy.
Check the Network tab
Reload and filter by 'trustpilot'. The script (usually tp.widget.bootstrap.min.js from widget.trustpilot.com) should return status 200. Blocked, failed or missing means the script is the problem.
Inspect the widget element
Right-click the gap, choose Inspect, and find the div with class trustpilot-widget. If it contains an iframe, the script ran. If it is empty, the script did not initialise it. If the iframe exists but is blank, check the widget settings.
Test with extensions and consent
Repeat with your ad blocker on, and with cookies declined in your consent banner, to see whether the widget depends on either.
How to fix it
Start by re-copying the embed code from your Trustpilot Business account (the Widgets or TrustBox area). Old or hand-edited snippets are the most common cause. Then place it as shown below.
<!-- TrustBox script: load once, ideally in <head> -->
<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async></script>
<!-- TrustBox widget: place where you want it to appear -->
<div class="trustpilot-widget" data-locale="en-GB" data-template-id="YOUR_TEMPLATE_ID" data-businessunit-id="YOUR_BUSINESSUNIT_ID" data-style-height="24px" data-style-width="100%">
<a href="https://uk.trustpilot.com/review/yourdomain.com" target="_blank" rel="noopener">Trustpilot</a>
</div>Re-add the embed
Paste the widget div into a Custom HTML block, or use Trustpilot's own plugin if you already use it. Put the script in the header via your theme or a header-scripts plugin.
Exclude it from optimisation
In your caching or performance plugin (for example minify, defer or delay JavaScript options), exclude widget.trustpilot.com from being delayed, combined or removed, then clear the cache.
Add the code to the theme
Go to Online Store > Themes > Edit code. Put the script in theme.liquid before </head> and the widget div in the relevant section or template file.
Check app conflicts
If you use a Trustpilot app, disable the manual code or the app embed so they do not clash. Re-test on a product page.
Load the script with a Custom HTML tag
Create a Custom HTML tag with the script line, triggered on All Pages or the pages with the widget. The widget div still has to be in the page itself.
Match consent settings
If the tag waits for consent, confirm it fires after the visitor accepts. Use Preview mode to check.
Use an Embed element
Add an Embed element where the widget should appear and paste the div. Add the script under Site settings > Custom code > Head code.
Publish and test
Embeds do not render fully in the Designer. Publish and test the live URL.
Add a Custom HTML/JS element
Paste the div into a Custom HTML/JS element, and add the script in the page's Tracking code (header) settings.
Use an Embed code element
Add an Embed HTML element, choose Code, and paste both the script and the div. Test on the published site, not the editor.
Use a Code Block
Add a Code Block (uncheck Display Source) with the div. Put the script under Settings > Advanced > Code Injection > Header. Code Blocks may need a paid plan.
Allow Trustpilot in your CSP
If you send a Content-Security-Policy header, allow the Trustpilot widget domains your console reports in script-src, frame-src and connect-src.
Initialise after dynamic loads
If you inject the div with JavaScript after page load (single-page apps, tabs, modals), call window.Trustpilot.loadFromElement(element) once the script is ready.
Broken
- Empty gap above the call to action
- Script delayed or removed by an optimisation plugin
- Console shows blocked or failed Trustpilot request
Fixed
- Stars and review count render on load
- Script returns status 200 and is excluded from delay rules
- Widget iframe present inside the trustpilot-widget div
How to confirm it's fixed
- Widget visible in a private window with extensions off
- Trustpilot script returns 200 in the Network tab
- No Trustpilot or CSP errors in the Console
- An iframe exists inside the trustpilot-widget div
- Widget shows after accepting and after declining cookies, if you intend it to
- Checked on mobile width and on every template that uses it (home, product, landing)
- Cache cleared and live page rechecked
How to prevent it happening again
- Keep one copy of the embed code, copied from Trustpilot, in your documentation
- Re-test the widget after theme, plugin, caching or consent banner changes
- Exclude widget.trustpilot.com from JavaScript delay and minify rules
- Review your CSP whenever you add or change third-party tools
- Give the widget a fixed minimum height so a failure does not shift your layout
- Add a manual monthly check of your top pages that show reviews
How FunnelGuard handles this
FunnelGuard covers this issue partly. As a robot visitor runs your real journeys on a schedule, it can detect when the Trustpilot script fails to load. When that happens and the failure is confirmed from a second region, you get one alert with a screenshot and a likely cause.
What it does not detect is an empty render: a case where the script loads fine, but the widget shows no stars or reviews (for example because of wrong settings or filters). It also will not tell you whether the widget looks right for visitors using ad blockers.
The Free plan includes 1 site and 2 journeys with daily checks and no card. Paid plans have a 3-day free trial. A free read-only website audit is also available.
Questions people ask
Why is my Trustpilot widget not showing on my website?
The most common reasons are a blocked or delayed Trustpilot script, a performance plugin that removes or defers it, wrong template or business unit IDs, or a Content Security Policy that blocks the domains. Open the browser console and Network tab to see which one applies.
Why does my Trustpilot widget show an empty box?
An empty box usually means the script loaded but has nothing to display. Check the template ID, business unit ID, language and any review filters in your Trustpilot Business account, and inspect whether an iframe exists inside the widget div.
Do ad blockers hide the Trustpilot widget?
Some ad blockers and privacy tools can block third-party widget requests, so some visitors may see a gap. Test with an ad blocker on, and give the widget a fixed height or a plain text fallback link so the layout still looks fine.
How do I add the Trustpilot widget to WordPress or Shopify?
Copy the embed code from your Trustpilot Business account. On WordPress, paste the widget div into a Custom HTML block and load the script in the header. On Shopify, add the script to theme.liquid and the div to the relevant section.
Why does the Trustpilot widget work in some pages but not others?
The script may only be loaded on some templates, or the widget is inside a tab, slider or popup that is created after the script runs. Make sure the script loads on every template and re-initialise the widget with Trustpilot.loadFromElement for dynamic content.
Can a cookie banner stop the Trustpilot widget from loading?
Yes, if you load the script through a tag manager or consent tool that waits for consent, it will not run until the visitor accepts. Decide whether the widget should wait, and test both accept and decline paths.
Can FunnelGuard tell me when my Trustpilot widget breaks?
Partly. FunnelGuard detects when the Trustpilot script fails to load, but it does not detect a widget that loads and renders empty. Check the widget manually on key pages to cover that gap.
Related issues
- PRF-099Third-party script fails to load (chat, form, payment widget)Fix guide
- PRF-100Third-party script slow and blocks renderingFix guide
- PRF-111Third-party script throws console errorsFix guide
- PRF-113Ad blockers break core functionality (site depends on blocked script)Fix guide
- PRF-107Social feed embed shows error/empty boxFix guide
- PRF-103Embedded form (HubSpot/Typeform) iframe never loadsFix guide