Use the JavaScript embed to add AppGram to a website without installing a framework package. The script runs in the browser and loads your project’s portal in a widget.
Add a floating widget
Place this in your page and replace the project ID. A public organization-slug/project-slug project key is also supported.
<script
src="https://cdn.appgram.dev/appgram.min.js"
data-project="YOUR_PROJECT_ID"
></script>
The script initializes from data-project. Load it once per page. A management API key is not part of embed configuration.
For a complete index.html page and local-server command, follow Show feedback in your application. Create and approve the walkthrough’s sample request first, then cast a vote in the widget and confirm the saved count in the dashboard.
Inline mode
Create the container before loading the script. Define settings before the script tag:
<div id="appgram-feedback" style="height: 600px"></div>
<script>
window.appgramSettings = {
projectKey: 'YOUR_PROJECT_ID',
mode: 'inline',
container: '#appgram-feedback',
defaultPage: 'feedback',
};
</script>
<script src="https://cdn.appgram.dev/appgram.min.js"></script>
The widget needs an existing container with visible dimensions. If your site uses a strict Content Security Policy, authorize the script and the portal iframe origin your project uses; an inline settings script also needs your application’s approved nonce or hash.
Open a page from your own button
After the script has loaded and initialized:
window.AppGram.open('feedback');
window.AppGram.close();
Do not call these methods from a script that runs before the external SDK has loaded. For a custom initialization flow, use the documented onReady callback and instance API.
Customer context and cleanup
The embed supports user in its initial settings and setUser for an active customer. For single-page applications, tear down the widget with destroy() when its owning screen is removed. Treat account changes and sign-out as a widget lifecycle change; do not assume passing an empty user object clears previous identity.
Continue with the embed reference, customer identity guide, and troubleshooting guide.