Search code examples
herokuplayframeworkgooglebotgoogle-rich-snippetstrustpilot

Trustpilot structured data markup not recognised by Googlebot / Structured Data Testing Tool on website


I have implemented some Trustpilot Trustboxes to get Rich Snippets for SEO on my website. This guide has been used. The issue is that the Google-bot and Google structured-data testing-tool do not recognise the markup that should be included in the header.

My tests:

  • I have created a "blank" page on the website that loads nothing but the necessary Trustpilot stuff. The testing-tool did not recognise the markup and did not detect the structured data.
  • I tested the markup through custom code on Structured Data Testing Tool, by adding the fetched markup directly in the header. The testing-tool detected the structured data.
  • When browsing the website, the markup can be seen in the html-header when inspecting the website in e.g. Chrome, Firefox etc. (it just cannot be seen by the Google bot or structured data testing tools).

My conclusion on the tests: The problem is not caused by slow loading speed or faulty markup. My best guess at the moment is that something in the framework or configuration used for the website blocks google from recognising/fetching the markup from Trustpilot. Of course, this is just my conclusion. I could be completely wrong.

Heroku and Play Framework is used to host/as framework for the website. Could it be that I have missed enabling some option in Play or Heroku that allows google to recognise/fetch the Trustpilot markup? Should something be added to the content security policy (something related to schema.org)?

Note: I may have wrongfully used terminologies in this question.

[UPDATED]

The Trustbox is used on lendino.dk and on this test app.

The code below is used on the test app:

<!DOCTYPE html>
<head>
    <script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js"></script>
</head>

<body>
    <div>
        <div class="trustpilot-widget"
            data-locale="en-US"
            data-template-id="54ad5defc6454f065c28af8b"
            data-businessunit-id="54e497ed0000ff00057d80c7"
            data-style-height="220px"
            data-style-width="100%"
            data-theme="light"
            data-tags="SelectedReview"
            data-schema-type="Organization">
            <a href="https://en.trustpilot.com/review/www.lendino.dk" target="_blank">Trustpilot</a>
        </div>
    </div>
</body>

Solution

  • I tried the link for the test app and got the same result. Also I tried to do it with the httpversion of the link. Then the markup appears in the testing tool.

    My best guess at this point is that your Content-Security-Policy is preventing something. I do not see https://widget.trustpilot.com in there, whereas the http version is specified in there (3 times). That seems to be the only difference as far as I can tell.