Embedded Review Form with Unique Link

This feature is part of the Connect add-on module.

This feature is part of the Connect add-on module, which can be purchased in addition to the Premium and Advanced plans, and is included in the Enterprise plan.

When you embed a Trustpilot review form on your business’s website, customers can post reviews directly from your site.

As of September 2024, the Embedded Review Form can now collect reviews labeled as Invited, even when third-party cookies are disabled. However, if your customers enabled cookies in their browsers, you’ll still need to gather their consent.

We encourage you to use Trustpilot's business API link to create a custom button that links to your review submission form.

The Embedded Review Form is a version of our submission form designed to be embedded in the check-out flow on your website, allowing customers to leave a review without having to sign in.

When used with Unique Links, reviews collected will be labeled as Invited.

The form can be used with programmatically generated Unique Links from your side, but not with those generated via Trustpilot's API.

What’s a Unique Link?

It’s a URL link that contains the customer data required to write a service review: name, reference number, and email. They’re generated and stored on your business’s server, so we only receive this data when customers click the link to write a review. They can only be used with the Embedded Review Form.

It includes a hash containing the data, along with a secret key made by Trustpilot specifically for your business. You can get your secret key code by contacting your account manager.

With verified Unique Links, it’s important to note that the email and a reference number must be passed and encrypted to form a Trustpilot invitation link (the Unique Link).

Here’s an example of a Unique Link using the following data:

  • Domain name: example.com
  • Reference number: A1B2C3
  • Customer email: john@example.com
  • Customer name: John Smith
  • Secret key: TrustpilotSecret

https://www.trustpilot.com/evaluate/embed/example.com?a=A1B2C3&b={BASE64(john@example.com)}&c={encodeURI(John Smith)}&e= {SHA1(TrustpilotSecretjohn@example.comA1B2C3)}

The result will look something like this - with the dynamic fields populated in the parameter after a= : 

<iframe src="https://www.trustpilot.com/evaluate/embed/example.com?a=A1B2C3&b={BASE64(john@example.com)}&c={encodeURI(John Smith)}&e={SHA1(TrustpilotSecretjohn@example.comA1B2C3)}"style=”border:0px #ffffff none;” name=”myiFrame” scrolling=”no” frameborder=”1” marginheight=”0px” marginwidth=”0px” height=”1000px” width=”600px” allowfullscreen></iframe>

What format can I use to encode Unique Links?

The formats are BASE64, SHA1, or encodeURI. You need to have a programming language that supports these formats, or use compatible third-party implementations. The braces {} and parentheses () indicate that the information contained within must be hashed/encoded.

Cookie consent

The Embedded Review Form uses cookies, so you’ll need to gather the necessary consent from users in order to use it.

You’ll need to gather consent for these categories before you can use the Embedded Review Form on your site:

  1. Strictly necessary cookies
  2. Performance cookies
  3. Functionality cookies

If you’d like to list which cookies are being used from each of these categories in your cookie banner, or would like to read more about what these categories mean, take a look at our cookie policy for more details.

The lists may change without notice, so you should regularly check for updates. Also, cookie consent varies by country and is ultimately based on the location of the user.

Create a Unique Link

When creating Unique Links to use in the Embedded Review Form, we suggest programming it to work dynamically with your customer data.

If you want to test what it could look like, it can be generated in real-time here.

This program is ONLY for testing.

If you're having issues with the parameter &e= (SHA1 hash), make sure it's formatted correctly. SHA1 only takes a single parameter, which is the concatenated string of the 3 required values. You'll need to ensure they're in the exact outlined order. The most commonly reported issue with the Unique Link is that the hash is incorrect. To illustrate how the hash should be made and what it should look like, we have a testing tool here.

How to embed the form

  1. Locate the Trustpilot URL to write a review for your website. For example: https://www.trustpilot.com/evaluate/YourWebsiteName.com
  2. Add embed/ to the URL after evaluate/ and before the website name. https://www.trustpilot.com/evaluate/embed/YourWebsiteName.com
  3. Create an iframe on your website loading this URL.

The result will look something like this, with the dynamic fields populated in the parameter after a= : 

Related articles