Skip to main content
You add a review widget to your website in the same way as a social widget: copy the code, then paste it where you want the widget to show.
1

Open the widget

On your dashboard, click the review widget. The review widget builder opens.
2

Copy the widget code

Click Install Widget. In the Install Widget window, click Copy Code.
3

Paste the code into your website

Paste the code into your page at the place where you want the widget to show. Paste all the lines of the code. Most website builders have an HTML or embed block for this. See the guide for your website builder.
4

Check your widget

Open the page on your live site. If you still see the old page, reload it.

What the code contains

The code has these parts:
  • A <div> with the class snapwidget-embed: the widget shows here, as part of your page.
  • <script src="https://snapwidget.com/js/snapwidget-embed.js"></script>: this script shows your reviews in the <div>.
When you change the settings or the layout, you do not need to change the code on your website. The widget shows your new settings and reviews on its own.

The iframe code

If your website builder only takes an iframe, click the Iframe code tab in the Install Widget window. The iframe code has these parts:
  • <script src="https://snapwidget.com/js/snapwidget.js"></script>: this script sets the height of the widget, so the widget is as tall as its reviews.
  • An <iframe> with the class snapwidget-widget: this is the widget.
With the Avatars layout, the iframe code has one more line:
This script opens a review in a pop-up over your page when a visitor clicks a photo. Without this script, the review opens inside the widget. If you use the iframe code and change the layout to or from Avatars, copy the code again and replace the old code on your website.

Put the widget in a box that has a width

The widget fills the width of the box that you put it in. The box must have a width. In a flex row, or in a box that shrinks to fit its content, the widget has no width to fill, so it can be too narrow. To fix this, give the box around the code a width. In a flex row, use flex: 1:
In a box that shrinks to fit, set width: 100%:

React, Vue and Next.js pages

The widget also works on pages that add it after the page loads, for example pages made with React, Vue or Next.js. Load the script of the code once on the page, for example in the <head>. Then add the <div> where you want the widget. When your page adds the <div>, snapwidget-embed.js finds it and shows the widget.

Dark pages

The widget works on pages with a dark background. On a dark page, set Theme to Dark in the widget builder. See Review widget settings.