# Add testimonials to any website

> Collect and show customer testimonials on any website - plain HTML, site builders and static site generators - by pasting two lines of embed code.

Source: https://sitebackend.com/docs/testimonials/any-website · Updated: 2026-10-11

SiteBackend's testimonials work on any website where you can paste HTML. You add a form where customers leave a testimonial, approve what comes in, and show the approved ones with a widget. There's no code to write and nothing to install.

## Before you start

In the dashboard, open your site's **Testimonials** tab:

- **Collect** has the embed code for the form customers fill in.
- **Widgets → New widget** creates a wall, carousel, single highlight or rating badge, with its own embed code.

Each embed code looks like this:

```html
<div data-sitebackend-widget="w_YOUR_WIDGET_ID"></div>
<script src="https://sitebackend.com/widget.js" async></script>
```

The `div` is where it appears. The `script` only needs to be on the page once, even if the page has several widgets.

## Plain HTML

Paste the embed code into your page where it should appear:

```html title="index.html"
<section>
  <h2>What our customers say</h2>
  <div data-sitebackend-widget="w_YOUR_WIDGET_ID"></div>
</section>

<section>
  <h2>Worked with us? Tell us how it went</h2>
  <div data-sitebackend-widget="c_YOUR_COLLECT_ID"></div>
</section>

<script src="https://sitebackend.com/widget.js" async></script>
```

## WordPress

In the block editor, add a **Custom HTML** block where the widget should appear and paste the embed code. Your account and hosting plan must allow scripts; WordPress can remove them when you save. See [WordPress's Custom HTML documentation](https://wordpress.org/documentation/article/custom-html/) and add testimonials to a WordPress site for page builders and sites that remove scripts.

## Webflow

Drag a **Code Embed** element onto the page and paste the embed code. The widget appears on the published site; it doesn't show inside the Designer. Code Embed requires an active Site plan or a Workspace plan that includes custom code; check [Webflow's Code Embed requirements](https://help.webflow.com/hc/en-us/articles/33961332238611-Custom-code-embed). See add testimonials to a Webflow site.

## Hugo, Jekyll and other static site generators

Put the embed code in a layout, partial or include. Markdown content usually needs a shortcode or include instead of raw HTML. See add testimonials to a Hugo site.

## It doesn't show up

- **The widget is empty until you approve a testimonial.** A widget with nothing to show takes up no space. Approve one in **Testimonials → Inbox**.
- **The site has a domain set.** Widgets then load on that domain and its subdomains over HTTPS, in the dashboard preview, and on `http://localhost` or `http://127.0.0.1` on any port. A staging address on another domain is blocked. See [sites](https://sitebackend.com/docs/getting-started/sites).
- **Your site has a Content Security Policy.** Allow `https://sitebackend.com` in `script-src` and `frame-src`. See the [embed script reference](https://sitebackend.com/docs/reference/embed-script).

Using a JavaScript framework? See the guides for [Next.js](https://sitebackend.com/docs/testimonials/nextjs), Nuxt, Astro and React.
