How the integration works
The widget is one script tag. The badge is drawn directly on your page inside an isolated shadow root, with no iframe, so our styles never touch your page and yours never touch the badge. You need no API key.
- You configure and save the widget in your company workspace, under Website widget. Appearance, language, position and the feedback form all come from these saved settings.
- Your page loads embed.js from the Feedbacks origin. The script inserts one element immediately after itself, at the place you put the tag, and draws the badge inside it. No iframe is created.
- The script asks Feedbacks to authorize your page. The browser sends your page's exact origin, which is compared with the website saved in your company settings. If they differ, nothing is shown and the page logs no network error.
- The badge renders your current rating and review count from approved reviews only, and refreshes about once a minute.
- When a visitor clicks the badge, the script opens a native modal dialog on your page containing the Feedbacks review form. This is the only frame, and it exists only after the click. If your Content Security Policy blocks it, or you add data-form-mode="window" to the script tag, the form opens in a browser window instead. Close, the backdrop and Escape all dismiss the dialog.
- The visitor submits with an email address and no sign-in. The feedback stays pending until they open the one-time confirmation link emailed to them.
Before you install
The widget fails closed. Each of these has to be true, or the badge renders as unavailable.
- Your company listing is published on Feedbacks.
- Your website is saved in company settings as an HTTP(S) URL, and it matches the page you are embedding on.
- The widget is enabled and saved on the Website widget tab.
- Your site's Content Security Policy, if it has one, allows the Feedbacks origin in script-src, connect-src and img-src. frame-src is only needed for the review dialog; without it the form opens in a window.
- Production sites are served over HTTPS. An HTTPS page cannot load an HTTP widget.
Install the widget
Pick your stack, paste the code where the badge should appear, and replace the placeholder alias with your company alias.
<script async src="https://feedbacks.am/embed.js" data-company-id="your-company-alias"></script>These examples use the placeholder alias your-company-alias. Your workspace generates the same snippet with your real alias already filled in, under Website widget → Install on your website.
Where to put it
- Inline placement renders the badge in normal page flow, exactly where the tag sits — footers and contact sections are the usual choice.
- Container and fixed placement are chosen in the dashboard, not in code. The loader positions the badge in the nearest positioned ancestor or against the viewport, in whichever of the four corners you saved, with a 20px inset.
- Several widgets can live on one page. Each installation owns only its own badge, so mount one loader per badge and never duplicate the same loader.
Configuration reference
Every option lives in your workspace and applies to all installation technologies. Save before you install; the badge picks up saved changes on its next refresh.
| Setting | Values | What it does |
|---|---|---|
| Layout | Horizontal, Vertical | Compact button row, or a stacked card. |
| Branding | Full logo, Icon only, Custom image | Original wordmark, the mark alone, or your own HTTP(S) image URL. Choosing a logo keeps a saved custom URL without using it. |
| Style | Classic, Warm, Teal, Dark | Four flat themes. No gradients or shadows are used. |
| Size | Small, Medium, Large | One font-size scale of 11, 13 and 16 px; all inner elements scale with it. |
| Language | English, Armenian | Language of the badge and the review form. |
| Button text | Up to 80 characters | Optional plain text. Empty or whitespace-only text falls back to the selected language's default. |
| Visible details | Rating, Review count | Independent switches. Hiding both removes the metadata row; the review form still shows real company information. |
| Position | Inline, In container, Fixed to screen | Normal flow, absolute inside your positioned container, or fixed against the viewport. |
| Corner | Top left, Top right, Bottom left, Bottom right | Used by both positioned modes, with a 20px inset. |
| Feedback form | Default review form, or any enabled custom form | What the dialog asks. Selecting an internal form makes its questions available through your widget without exposing its authorized link. |
What a visitor goes through
The review flow is designed for visitors who have never used Feedbacks and will not create a password.
- No sign-in. Every submission requires an email address, including from people who already have an account.
- Published widget feedback is always anonymous. The email stays private and is never shown on your listing.
- Submissions start pending. They do not affect your public listing or rating until they are confirmed.
- The confirmation link is single-use, expires in 24 hours and is bound to the recipient's mailbox. Opening the email page never confirms anything by itself — the visitor has to press Confirm.
- An unknown email address gets an inactive account, which activates on confirmation. Confirmation grants no login session.
- Rate limits: 10 submissions per hour per IP address, 3 per hour per recipient mailbox and 30 confirmation attempts per hour per IP address.
- If mail delivery fails the whole submission is rolled back, so a visitor never ends up with a review they cannot confirm.
Troubleshooting
Almost every failed installation is one of these five.
| What you see | Likely cause | Fix |
|---|---|---|
| The badge is hidden and the console shows a [Feedbacks] warning | The page origin does not match the saved website, the widget is not enabled, or the listing is not published | Compare the saved website with your page's exact origin, including scheme, host and port, then enable and save the widget. |
| Nothing appears at all | The script could not load, or the tag has no data-company-id | Check the browser console for a request blocked by script-src or connect-src, and keep the data-company-id attribute — the loader exits silently without it. |
| Clicking opens a browser window instead of a dialog | Your Content Security Policy blocks frames from Feedbacks | The window is the automatic fallback and works as is. To use the in-page dialog, add the Feedbacks origin to frame-src. |
| It works locally but not in production | Mixed content, or a different production origin | Serve both sides over HTTPS and save the production origin as your company website. |
| It stopped working behind a proxy or CDN | Widget data responses are cached or rewritten, or the Origin header is removed | Do not cache, rewrite or strip headers from /widget-data/ responses or from cross-origin requests to the Feedbacks origin. |
For AI agents
Hand this brief to a coding agent — Claude Code, Cursor, Copilot or anything else — and it has everything needed to install the widget correctly: the inputs to ask you for, the snippet for each stack, the rules it must not break, the CSP change and how to verify the result.
Widget integration brief
# Feedbacks website review widget — integration brief for coding agents
Documentation: https://feedbacks.am/en/docs/widget
This file is the authoritative installation contract. Follow it exactly.
## What you are installing
One <script> tag that loads https://feedbacks.am/embed.js.
The script inserts one element immediately after itself and draws the rating badge inside an
isolated shadow root. No iframe is created for the badge. The script also owns the review dialog
and every network call. There is no SDK, no API key, no stylesheet to import and no markup of ours
to style. Your whole job is placing the loader and
keeping it unmodified.
## Inputs you need
1. COMPANY_ALIAS — the company's Feedbacks alias, visible in its dashboard URL
https://feedbacks.am/en/dashboard/manage/<alias>
Ask the user for it if the repository does not already hold it.
2. The exact public origin of the site you are editing: scheme + host + port. It must equal the
website saved in the company's Feedbacks settings, or the badge stays hidden.
Never invent an alias. If it is unknown, leave your-company-alias in place and tell the
user in your summary that it must be replaced before deploying.
## Install
Use the one block that matches the host project, and put the widget where the badge belongs — a
footer, a contact section, or a fixed corner.
### Plain HTML — paste into the body at the badge position
<script async src="https://feedbacks.am/embed.js" data-company-id="your-company-alias"></script>
### Next.js (App Router) — app/components/FeedbacksWidget.jsx
"use client";
import { useEffect, useRef } from 'react';
export default function FeedbacksWidget() {
const container = useRef(null);
useEffect(() => {
const element = container.current;
const script = document.createElement('script');
script.src = "https://feedbacks.am/embed.js";
script.async = true;
script.dataset.companyId = "your-company-alias";
element.appendChild(script);
return () => element.replaceChildren();
}, []);
return <div ref={container} />;
}
### React — FeedbacksWidget.jsx
import { useEffect, useRef } from 'react';
export default function FeedbacksWidget() {
const container = useRef(null);
useEffect(() => {
const element = container.current;
const script = document.createElement('script');
script.src = "https://feedbacks.am/embed.js";
script.async = true;
script.dataset.companyId = "your-company-alias";
element.appendChild(script);
return () => element.replaceChildren();
}, []);
return <div ref={container} />;
}
### Vue 3 — FeedbacksWidget.vue
<script setup>
import { ref, onMounted, onBeforeUnmount } from 'vue';
const container = ref(null);
onMounted(() => {
const script = document.createElement('script');
script.src = "https://feedbacks.am/embed.js";
script.async = true;
script.dataset.companyId = "your-company-alias";
container.value.appendChild(script);
});
onBeforeUnmount(() => container.value?.replaceChildren());
</script>
<template>
<div ref="container" />
</template>
Render <FeedbacksWidget /> once, where the badge should appear.
## Rules you must not break
- Do not change the script URL, bundle embed.js, self-host it, inline its contents, or add
integrity/crossorigin attributes. It must load from https://feedbacks.am at runtime.
- Keep the data-company-id attribute. The loader exits silently without it.
- Mount exactly one loader per visible badge. Each installation owns only its own badge, so
several widgets on a page are fine, but a duplicated loader renders a duplicated badge.
- Do not style or reposition the badge element the loader inserts. Its position comes from the saved
dashboard settings, and its styles are isolated in a shadow root.
- Do not proxy, rewrite, cache or server-render https://feedbacks.am/widget-data/ or strip headers from
cross-origin requests to it — those responses are authorized per browser Origin and sent no-store.
- Optional: add data-form-mode="window" to the script tag to open the review form in a browser
window instead of an in-page dialog, so no frame is ever created.
- There are no secrets, tokens or environment variables in this integration. A request to add an
API key means something has been misunderstood.
## Content Security Policy
If the host site sends a CSP, add our origin to these directives:
script-src 'self' https://feedbacks.am;
connect-src 'self' https://feedbacks.am;
img-src 'self' https://feedbacks.am;
frame-src 'self' https://feedbacks.am;
frame-src is only needed for the review dialog. Without it the form opens in a browser window.
Serve production sites over HTTPS. An HTTPS page cannot load an HTTP widget.
## Framework notes
- Next.js: the component must be a Client Component, because it appends the script in an effect.
Do not replace it with next/script — embed.js reads document.currentScript to find its mount
point, which next/script does not preserve.
- React/Vue: clean up on unmount, as the examples do with replaceChildren(). Without it, React
Strict Mode's double mount leaves two badges in development.
- Static site generators: the plain HTML snippet belongs in the template, not in a Markdown body
that escapes script tags.
## Verify
1. Open the page on the authorized origin. A badge shows the company's rating and review count.
2. Click it. A modal dialog opens with the review form, with no sign-in required.
3. A visitor submits with an email address; the review stays pending until they confirm it through
the one-time link emailed to them.
## When the badge does not appear
The console shows one [Feedbacks] warning. The page origin does not match the saved website, the widget is not enabled, or the company listing
is not published. All three are dashboard settings at
https://feedbacks.am/en/dashboard/manage/<alias>/widget
A person has to fix them there. There is no public write API for them, so do not attempt a code
workaround.
Agents with web access can read the same brief directly at /llms.txt, which is often easier than pasting it.
What an agent cannot do for you
- Enabling the widget, saving the authorized website, choosing its appearance or selecting a custom form. These are dashboard settings with no public write API.
- Publishing your company listing, which the live widget requires.
- Deciding the badge's placement on your site. Tell the agent where it belongs, or review where it put it.