Developer guide
Add Ascenta Chat to Custom or agency-built website
Your developer adds one line to the shared page layout. Send them this page.
About 10 minutes
- 1
Find the shared layout template
The file every page is rendered from: footer.php or layouts/app.blade.php (Laravel), base.html (Django), application.html.erb (Rails), _Layout.cshtml (.NET), a Thymeleaf or JSP layout (Java).
- 2
Paste the code just before </body>
<script src="http://localhost:3000/widget.js" data-company-id="YOUR_WIDGET_KEY" async></script>
- 3
If the site sets a Content-Security-Policy, allow our address
Add http://localhost:3000 to script-src (the loader), frame-src (the chat window is an iframe from the same origin) and connect-src (API calls and the live stream). Nothing else is needed: no cookies, no third-party domains.
- 4
Deploy
The widget key is a public identifier, not a secret. It is fine in a repository.
- 5
Open your website in a new tab
The chat button appears in the bottom corner within a second. If you do not see it, refresh once. Your dashboard shows "Live" the first time it loads.
How you know it worked
- Open the published website, not the builder preview.
- The chat button appears in the bottom corner within a second.
- The Add to website page in your dashboard changes to “Your chat is live”.
