/trustpilot

Trustpilot pixel app

Primary LanguageTypeScript

📢 Use this project, contribute to it or open issues to help evolve it using Store Discussion.

Trustpilot

All Contributors

This is a Trustpilot first-party integration app. The solution provides a review platform for your store.

Configuration

  1. Install the vtex.trustpilot app in the VTEX account in which you are working.
  2. In your VTEX account's admin, open the App section and select the Trustpilot App box.
  3. Fill in your integration key, provided by Trustpilot, in the fields.
  4. Save your changes.

Using the Trustpilot's Widget component

The trustpilot app also enables Truspilot's widget component to be added to your store theme by adding the trustpilot-micro-review-count block in a template of your choosing.

  1. Using a Developer workspace, open your store's theme directory in your code editor and add the shop-review-interfaces app as a dependency in the manifest.json file:
  "dependencies": {
+    "vtex.shop-review-interfaces": "0.x"
  }
  1. Add the shop-review-badge block, exported by the shop-review-interfaces, in a template and block of your choosing, such as the Footer.
  2. Save your changes and link the store theme app.
  3. Once your changes linked, access the admin's Site Editor using the same Developer workspace ({workspaceName}-{accountName}.myvtex.com/admin/cms/site-editor) and look for the Trustpilot - Generic Widget block.
  4. When editing the block, add the widget's template id and business unit id value provided by the Trustpilot's widget.
  5. Save your changes.
  6. Access your store's website using the Developer workspace to check out the new component. If no more changes are desired, repeat the steps above in a Production workspace and then promote it to Master.

ℹ️ The integration key must be provided by Trustpilot.

The trustpilot app also enables Truspilot's widgets to be added to your store theme by inserting the shop-review-badge interface in your layout and then using the trustpilot-widget block in a template of your choosing.

Interface Block Description
shop-review-badge trustpilot-widget Adds a Trustpilot widget in your store.

Block without badge

To use widget without shop-review-badge to landing pages, for example, you can use trustpilot-widget. Therefore, you need to add the following in the manifest.json file.

 "peerDependencies": {
+   "vtex.trustpilot": "2.x"
 }

trustpilot-widget as props

{
   "trustpilot-widget#home":{
      "title":"Widget TrustPilot",
      "props":{
         "width":"100%",
         "height":"240px",
         "theme":"light",
         "stars":"4,5",
         "tag":"cart",
         "businessUnitId":"597a23fwffdsfe05a793fe",
         "templateId":"5419b6a8b0d04a076446a9ad"
      }
   }
}
Prop name Type Description Default value
width string Change width of template undefined
height string Change height of template undefined
theme string Change theme of template light or dark undefined
stars string Change stars stock of template undefined
tag string Change tag of template. More info here undefined
businessUnitId string Set your business code undefined
templateId string Set your template ID 5419b6a8b0d04a076446a9ad

Contributors ✨

Thanks goes to these wonderful people:

This project follows the all-contributors specification. Contributions of any kind are welcome!