Lovable
Add Testimonials to a Lovable App
Lovable writes a React app for you, and React is covered by our Next.js and React guide. That guide is for a developer writing components. In Lovable you usually do not write the code: you ask the project chat in Build mode, check the preview, and publish changes. This page gives you a prompt that describes the StoryProof embed precisely enough for Lovable to place it, a follow-up prompt for when the section comes up empty, and the manual route through Lovable’s code editor.
- A Build mode prompt with your widget id in it
- A follow-up prompt for an empty section
- Publish changes, or the live site stays as it was
Prompts and code
Prompts with your widget id filled in
Enter your widget id. Paste the first prompt into the Lovable project chat with Build selected. The last two blocks are the raw lines, for checking Lovable’s work or editing by hand.
Try it here, no sign-up
Part 1 · Prompt for Build mode
Lovable editor › project chat › mode picker: Build › paste and send
Prompt to paste into the Lovable project chat, in Build mode
Add a "What customers say" section to the home page, below the
features section. Inside it, render an empty div exactly like this,
with no children:
<div data-storyproof-widget="YOUR_WIDGET_ID"></div>
Load this script once for the whole app, not inside the section
component, and make sure the browser actually executes it rather
than printing it as text:
https://app.storyproof.io/embed.js (async)
Do not change any other part of the page.Part 2 · Follow-up if the section is empty
Project chat › Build mode
Follow-up prompt if the section shows up empty in the preview
The StoryProof section renders but stays empty. Check that the
script https://app.storyproof.io/embed.js is loaded once and executed by the browser,
that the div with data-storyproof-widget="YOUR_WIDGET_ID" is in the
page when the script runs, and that nothing renders inside that
div. Explain what you changed.Part 3 · The div Lovable should render
Code tab › the component for the section
<div data-storyproof-widget="YOUR_WIDGET_ID"></div>Part 4 · The script, loaded once
Code tab › wherever the app loads page wide scripts
<script src="https://app.storyproof.io/embed.js" async></script>Check the preview, then click Publish and Publish changes. Lovable’s docs say the live site keeps the version you last published until you do.
The prompts are filled in your browser. Nothing you type is sent to Lovable or to us.
The problem, solved
Why a widget goes missing in a Lovable app
- Problem 1
Lovable discussed it but changed nothing
Lovable’s docs say Chat mode and Plan mode do not touch your code. Only Build makes the change.
How StoryProof solves it
Send the prompt in Build mode. It describes the embed as it is: one empty div carrying your widget id and one async script.
- Problem 2
The script shows up as text
A script tag written straight into a React component is not run by the browser, so the page can show the code or nothing at all.
How StoryProof solves it
The prompt asks Lovable to load the script so the browser executes it, once for the whole app. One copy fills every StoryProof div on the page.
- Problem 3
It works in preview, not on the live site
Lovable publishes a copy of the project. Later changes stay off the live URL until you publish again.
How StoryProof solves it
Click Publish, then Publish changes. The widget itself shows only the approved testimonials you chose for it in StoryProof.
- Problem 4
AI wrote us fake testimonials
Ask an AI builder for a testimonials section and it may fill it with invented names and quotes, which you must never publish.
How StoryProof solves it
Replace placeholder quotes with the StoryProof widget. Its content comes from real customers, and nothing appears until you approve it.
In StoryProof
Add it with Lovable
- You will need
- A Lovable project you can edit
- A StoryProof widget with approved testimonials
- For manual edits, a paid Lovable plan
- 1
Build the widget in StoryProof
Choose a layout and the approved testimonials it should show, then copy its id into the tool above.
- 2
Prompt Lovable in Build mode
Select Build in the project chat’s mode picker and send the first prompt. Say where on the page the section belongs.
- 3
Check its work in the code editor
Open the Code tab and search for data-storyproof-widget. The div should be empty, and the script should appear once.
- 4
Or edit the code yourself
On a paid plan you can type into the code editor and Save. Lovable does not review manual edits; each save becomes a version you can revert.
- 5
Test the preview, then publish changes
Try phone and desktop sizes in the preview, then Publish › Publish changes, and open the live URL.
What happens next: Later prompts can rewrite the section. After any big redesign request, search the code for data-storyproof-widget again before publishing.
Lovable editor modes and the widget
From Lovable’s documentation of the project chat and code editor.
Before you start
Limits in Lovable
Docs as of 2026-12-04
Modes, the code editor and publishing follow Lovable’s documentation as of 2026-12-04. These steps have not been followed in a live Lovable project by us.
Lovable’s docs do not cover scripts
We found no Lovable page on adding third party scripts or naming the file they belong in. The prompt leaves that choice to Lovable, and you check the result.
AI output varies
The same prompt can produce different code on different days. Always check the preview and the code, not only Lovable’s summary.
Navigating between routes
The script loads once per page load. If a widget on a second route stays empty after an in-app navigation, ask Lovable to make that link a normal page load, and tell StoryProof support.
FAQ
Questions people ask
Short answers to what usually comes up next.
Can I paste the embed code straight into the Lovable chat?
You can, but say what it is and where it goes. The prompt above does that, and asks Lovable to keep the div empty and run the script once.
Do I need a paid Lovable plan?
Lovable’s docs say manual code editing needs a paid plan; on Free the editor is read only. Prompting in Build mode is how Free projects change code.
How is this different from the Next.js and React guide?
That guide gives developers components to write. Here Lovable writes the code from your prompt, and you check and publish it.
Will Lovable keep the widget when I ask for other changes?
Usually, but not always. Search the code for data-storyproof-widget after large requests, before you publish changes.
Can I try StoryProof before wiring it in?
Yes. Every account starts with a free trial and no credit card, so you can get a widget id first.
Still have a question? Ask the StoryProof team or book a demo.
Real testimonials for your Lovable app
Collect and approve testimonials in StoryProof, then have Lovable place one widget.
Ready when you are
Sources
- Work with Lovable in the project chat, Lovable Documentation. Checked 2026-12-04.
- View and edit your project’s code, Lovable Documentation. Checked 2026-12-04.
- Publish your project, Lovable Documentation. Checked 2026-12-04.
Last updated 2026-12-04.