Trustpilot
This is a Trustpilot first-party integration app. The solution provides a review platform for your store.
Configuration
- Install the
vtex.trustpilot
app in the VTEX account in which you are working; - In your VTEX account's admin, open the App section and select the Trustpilot App box;
- Fill in your integration key, provided by Trustpilot, in the fields;
- 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.
- 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 themanifest.json
file:
"dependencies": {
+ "vtex.shop-review-interfaces": "0.x"
}
- Add the
shop-review-badge
block, exported by theshop-review-interfaces
, in a template and block of your choosing, such as the Footer; - Save your changes and link the store theme app;
- 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 theTrustpilot - Generic Widget
block; - When editing the block, add the widget's
template id
andbusiness unit id
value provided by the Trustpilot's widget; - Save your changes;
- 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.
:informationsource: _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": "1.x"
}
trustpilot-widget
as props
trustpilot-widget
as props{
"trustpilot-widget#home":{
"title":"Widget TrustPilot",
"props":{
"width":"100%",
"height":"240px",
"theme":"light",
"stars":"4,5",
"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 |
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!
Updated 10 months ago