"},{"@type":"HowToStep","name":"Add the widget","text":"Place a div with data-shoutjar-widget attribute wherever you want testimonials to appear:
"},{"@type":"HowToStep","name":"Configure options","text":"Optionally customize with data attributes like data-shoutjar-style, data-shoutjar-theme, and data-shoutjar-max"}]}
INTEGRATIONS

HTML + Shoutjar

Add testimonial widgets to any website. One script tag. One line of HTML. Works everywhere HTML works.

Works with any website
Static sites supported
No dependencies
</>
HTML
Shoutjar

Works With Any Website

Don't see your platform in our integrations list? No problem. If your site uses HTML (and all websites do), Shoutjar works.

This integration covers:

Plain HTML websites

Static site generators (Hugo, Jekyll, 11ty, Astro)

Custom-built sites

PHP, Ruby, Python templates

Any CMS with HTML access

Literally anything that renders HTML

Two pieces of code. That's it.

Just Copy and Paste

Two steps. No build tools. No package managers. No configuration files.

1
Add the Script

Add this before </body> on your page:

HTML
<script src="https://cdn.shoutjar.com/widget.js" defer></script>

2
Add the Widget

Put this wherever you want testimonials to appear:

HTML
<div data-shoutjar-widget="YOUR_WIDGET_ID"></div>

That's it. Replace YOUR_WIDGET_ID with your actual widget ID from Shoutjar. Your testimonials are now live.

Full Code Examples

Copy-paste ready examples for common setups.

Basic HTML Page

index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Website</title>
</head>
<body>
    <header>
        <h1>Welcome to My Website</h1>
    </header>

    <main>
        <section>
            <h2>What Our Customers Say</h2>
            <div data-shoutjar-widget="YOUR_WIDGET_ID"></div>
        </section>
    </main>

    <footer>
        <p>&copy; 2026 My Website</p>
    </footer>

    <script src="https://cdn.shoutjar.com/widget.js" defer></script>
</body>
</html>

With Custom Style

Widget Styles
<!-- Carousel style -->
<div data-shoutjar-widget="YOUR_WIDGET_ID" data-shoutjar-style="carousel"></div>

<!-- Grid style -->
<div data-shoutjar-widget="YOUR_WIDGET_ID" data-shoutjar-style="grid"></div>

<!-- Marquee style -->
<div data-shoutjar-widget="YOUR_WIDGET_ID" data-shoutjar-style="marquee"></div>

<!-- Badge style -->
<div data-shoutjar-widget="YOUR_WIDGET_ID" data-shoutjar-style="badge"></div>

<!-- Single testimonial -->
<div data-shoutjar-widget="YOUR_WIDGET_ID" data-shoutjar-style="single"></div>

Multiple Widgets on One Page

index.html
<!-- Badge in header -->
<header>
    <div data-shoutjar-widget="YOUR_WIDGET_ID" data-shoutjar-style="badge"></div>
</header>

<!-- Grid in main content -->
<main>
    <div data-shoutjar-widget="YOUR_WIDGET_ID" data-shoutjar-style="grid"></div>
</main>

<!-- Only need the script once -->
<script src="https://cdn.shoutjar.com/widget.js" defer></script>

Static Site Generators

Same two lines of code, adapted for your SSG's template syntax.

H
Hugo

Add to your base template (e.g., layouts/_default/baseof.html):

layouts/_default/baseof.html
<script src="https://cdn.shoutjar.com/widget.js" defer></script>

Use in any content or template:

Hugo template
<div data-shoutjar-widget="{{ .Site.Params.shoutjarWidgetId }}"></div>

J
Jekyll

Add to _includes/footer.html or _layouts/default.html:

_layouts/default.html
<script src="https://cdn.shoutjar.com/widget.js" defer></script>

Use anywhere:

Jekyll template
<div data-shoutjar-widget="{{ site.shoutjar_widget_id }}"></div>

11
11ty (Eleventy)

Add to your base layout:

_includes/base.njk
<script src="https://cdn.shoutjar.com/widget.js" defer></script>

Use in templates:

Nunjucks template
<div data-shoutjar-widget="{{ shoutjarWidgetId }}"></div>

A
Astro

In your layout component:

Layout.astro
---
// Layout.astro
---
<html>
<body>
  <slot />
  <script src="https://cdn.shoutjar.com/widget.js" defer></script>
</body>
</html>

Use in pages:

index.astro
<div data-shoutjar-widget={import.meta.env.PUBLIC_SHOUTJAR_WIDGET_ID}></div>

For React, Next.js, and Gatsby, see our dedicated integration guides: React · Next.js

Configuration Options

Data Attributes

AttributeValuesDefaultDescription
data-shoutjar-widgetWidget IDrequiredYour widget ID from Shoutjar
data-shoutjar-stylegrid, carousel, marquee, badge, singlecarouselWidget display style
data-shoutjar-themelight, dark, autoautoColor theme
data-shoutjar-maxnumberallMaximum testimonials to show
data-shoutjar-ratingtrue, falsetrueShow star ratings
data-shoutjar-sourcetrue, falsetrueShow source icons

Example with All Options

HTML
<div
    data-shoutjar-widget="YOUR_WIDGET_ID"
    data-shoutjar-style="grid"
    data-shoutjar-theme="dark"
    data-shoutjar-max="6"
    data-shoutjar-rating="true"
    data-shoutjar-source="true"
></div>

Available Widget Styles

Choose the perfect display for your site

Grid

Multiple testimonials in columns. Clean, professional.

Best for: Dedicated testimonial sections
data-shoutjar-style="grid"

Carousel

One at a time with smooth transitions. Default style.

Best for: Limited space, homepage sections
data-shoutjar-style="carousel"

Marquee

Continuous scrolling ticker. Eye-catching.

Best for: Announcement bars, headers
data-shoutjar-style="marquee"

Badge

Compact "4.8 ★ (50 reviews)" display. Minimal space.

Best for: Headers, CTAs, navigation
data-shoutjar-style="badge"

Single

Feature one testimonial prominently. Bold and focused.

Best for: Landing pages, hero sections
data-shoutjar-style="single"

Custom Styling

Container Styling

HTML
<div style="max-width: 800px; margin: 40px auto; padding: 20px;">
    <div data-shoutjar-widget="YOUR_WIDGET_ID"></div>
</div>

CSS Variables

styles.css
:root {
    --shoutjar-primary: #3B82F6;
    --shoutjar-background: #ffffff;
    --shoutjar-text: #111827;
    --shoutjar-text-secondary: #6B7280;
    --shoutjar-border: #E5E7EB;
    --shoutjar-radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --shoutjar-background: #1F2937;
        --shoutjar-text: #F9FAFB;
        --shoutjar-text-secondary: #9CA3AF;
        --shoutjar-border: #374151;
    }
}

Custom Classes

HTML
<div class="my-testimonials-section" data-shoutjar-widget="YOUR_WIDGET_ID"></div>
styles.css
.my-testimonials-section {
    background: linear-gradient(to bottom, #f9fafb, #ffffff);
    padding: 2rem;
    border-radius: 1rem;
}

Where to Put Testimonials

Strategic placement for maximum impact

Homepage

Below hero section or features. First impression social proof.

Pricing Page

Near pricing tables. Address "is it worth it?" questions.

Product/Service Pages

After features, before CTA. Reinforce value.

Contact Page

Build trust before they reach out.

Footer

Subtle, always-present social proof across all pages.

Landing Pages

Multiple placements: badge near CTA, grid below features, single in hero.

Performance

~15KB

gzipped script

Zero

dependencies

99.9%

CDN uptime

Core Web Vitals Impact

LCP -- Loads after main content, no impact on largest paint
FID -- Non-blocking with defer, no input delay
CLS -- Fixed dimensions, no layout shift

Lazy Loading

HTML
<div
    data-shoutjar-widget="YOUR_WIDGET_ID"
    data-shoutjar-lazy="true"
></div>

Troubleshooting

Widget not appearing?

  1. 1.Check widget ID -- Make sure you're using your actual widget ID from the Shoutjar dashboard
  2. 2.Script loaded? -- Open browser DevTools, check the Network tab for widget.js
  3. 3.HTML valid? -- Ensure the widget div is properly closed
  4. 4.Testimonials exist? -- You need at least one testimonial added in Shoutjar

Script blocked?

Some ad blockers may interfere. The CDN URL is https://cdn.shoutjar.com/widget.js

Styling conflicts?

Use CSS variables to override widget defaults, or wrap in a container with isolation:

<div style="all: initial;">
    <div data-shoutjar-widget="YOUR_WIDGET_ID"></div>
</div>

Multiple widgets not working?

You only need the script once per page. Multiple script tags can cause issues.

Correct
<div data-shoutjar-widget="ID_1"></div>
<div data-shoutjar-widget="ID_2"></div>
<script src="...widget.js" defer></script>
Incorrect
<div data-shoutjar-widget="ID_1"></div>
<script src="...widget.js" defer></script>
<div data-shoutjar-widget="ID_2"></div>
<script src="...widget.js" defer></script>

Frequently Asked Questions

Do I need to use a specific platform?

No. If your website uses HTML (all websites do), this works. Static sites, custom builds, CMSs — anything.

Does it work with static site generators?

Yes. Hugo, Jekyll, 11ty, Astro, Gatsby — all work. Add the script to your base template and the widget div wherever you want.

Will it slow down my site?

No. The script loads asynchronously with the defer attribute. It's ~15KB gzipped, delivered via global CDN, and has zero impact on Core Web Vitals.

Can I customize the styling?

Yes. Use CSS variables, custom classes, or configure everything in the Shoutjar dashboard. Widgets adapt to your design.

How do I update testimonials?

Add or edit testimonials in Shoutjar. They appear on your site automatically — no code changes or redeployment needed.

Can I use multiple widgets on one page?

Yes. Add multiple widget divs with different configurations. You only need the script tag once per page.

What if I don't have any testimonials yet?

Sign up for Shoutjar, import from review platforms like G2 or Trustpilot, or use auto-discovery to find mentions you didn't know existed.

Platform-Specific Guides

Need a guide for a specific platform? We've got you covered.

Add Testimonials to Your Website

Two lines of code. Works everywhere. No dependencies. Copy, paste, done.

Get Started Free
Works with any website
Static sites supported
Free plan available