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:
_10 "dependencies": {_10+ "vtex.shop-review-interfaces": "0.x"_10 }
- 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.
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.
_10 "peerDependencies": {_10+ "vtex.trustpilot": "1.x"_10 }
trustpilot-widget
as props
_14{_14 "trustpilot-widget#home":{_14 "title":"Widget TrustPilot",_14 "props":{_14 "width":"100%",_14 "height":"240px",_14 "theme":"light",_14 "stars":"4,5",_14 "tag":"cart",_14 "businessUnitId":"597a23fwffdsfe05a793fe",_14 "templateId":"5419b6a8b0d04a076446a9ad"_14 }_14 }_14}
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 |