Quickstart
Two lines of HTML put your reviews on a page. Everything else — collecting them, tying each one to a real purchase, moderating what appears — builds on top of that.
- 1
Create a project
A project is one website or app. It owns its own keys and its own products, so two sites never share a rating. Create one in your dashboard, and you get two keys.
Key Where it belongs pk_…Public. Safe in a web page — it can only read published reviews and post new ones. sk_…Secret. Server only. It mints invitations and moderates reviews. Never ship it to a browser. - 2
Put the widget on the page
Paste this where the reviews should appear. The script is loaded once per page, however many widgets are on it.
html<div data-trueavis data-key="pk_your_public_key"></div> <script src="https://trueavis.com/trueavis.js" async></script>
That renders the rating, the star distribution and the reviews themselves. It needs no build step, no framework and no npm install, and it styles itself inside a shadow root so your CSS and its CSS cannot collide.
- 3
Ask a customer for a review
Anyone can leave a review through the widget. A review only becomes verified when it arrives with an invitation token, which you mint from your server after a real purchase.
bashcurl -X POST https://trueavis.com/api/admin/invitations \ -H "Authorization: Bearer sk_your_secret_key" \ -H "Content-Type: application/json" \ -d '{ "customerEmail": "[email protected]", "orderRef": "ORDER-1042", "baseUrl": "https://your-site.com" }'The response carries a
url. Put it in your own order-confirmation email. That link is what makes the resulting review verifiable, and it can be spent once.
Choosing what to show
One attribute changes what the widget renders. A new site with no reviews yet should start with trust, which says the business is verified without inventing a score.
| data-mode | Renders |
|---|---|
full | Rating, star distribution and the reviews. The default. |
list | Just the reviews, for a page that has its own header. |
badge | A compact score, for a header or a product tile. |
trust | A pill linking to your public TrueAvis page. Works with no reviews at all. |
The trust badge needs no container — it can pin itself to a corner of the window from a single script tag:
<script src="https://trueavis.com/trueavis.js"
data-key="pk_your_public_key"
data-trust-badge="bottom-right" async></script>Starting from zero is normal
full and list say so plainly, and trust shows “Verified business” instead of a rating. The structured data that search engines read stays absent until there is a real review behind it — a five-star average from nothing is a liability, not an advantage.Where to go next
Reviews come in two shapes, and the difference decides what your ratings mean: company reviews are about the business, product reviews are about one thing you sell. If you run a Shopify store, invitations can be sent automatically. And if you want to know why any of this can be believed, read how verification works.