Display reviews on your website

Our embeddable review widget is a simple way to promote your customers’ reviews into the content of your web site or web page. In this brief tutorial, you’ll learn how to use it.

Installation

Step 1

Copy the JavaScript embed code from the 5starRocket dashboard by going to: Settings > Widget > Installation, and paste it after the opening <body> tag on every page you want the reviews to appear for website visitors.

The snippet should look like this:

<!-- Begin 5starRocket widget -->
<script>
(function(r,o,c,k,e,t){r.ReviewRocket||(e=o.createElement(c),t=o.getElementsByTagName(c)[0],e.async=1,e.src="https://embed.5starrocket.com/widget.js",e.dataset.reviewrocketId=k,t.parentNode.insertBefore(e,t))})
(window, document, "script", "YOUR_ACCOUNT_ID");
</script>
<!-- End 5starRocket widget -->
Important: Don’t use the snippet above, it’s just for demonstration purposes. Get the actual embed code for your account from here.

Step 2

Place this code wherever you want the widget to appear on your page.

<div class="fsr-embed" data-widget="feed"></div>

Allowed domains

When you add a domain restriction, the widget will only work for requests that originate from the domains you specify.

You don’t need to add any subdomains, just the main domain(s). In other words, example.com will also apply for subdomain.example.com. Enter the list of allowed domains as a line-separated list.

Note: A valid domain requires a host and must not include any path, port, query or fragment. For instance, example.net is a valid allowed domain format.
Important: Don’t use any of the URL formats listed here:
  • www.example.com
  • https://example.com
  • https://example.com:8080
  • https://example.com/path/
  • http://example.com/path/?id=123

Options

Options can be passed via HTML5 data attributes by appending the option name to data-.

For example: data-per-page="5".

Setting Description Default
per-page The number of reviews to display at a time. Minimum is 1 and maximum is 50. 10
navigation Whether you want users to navigate through your reviews. Values: default or none. default
gravatar Use Gravatar to display the profile image (when available) of customers using the email address they provided. false