Developer guide
Add Ascenta Chat to React, Vue or Angular (single page app)
Paste the line into the one HTML file the app is served from.
About 5 minutes
- 1
Open the HTML shell
index.html in Vite, Create React App and Angular. In Nuxt, add it under app.head.script in nuxt.config, or use useHead() in app.vue.
- 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, frame-src and connect-src.
- 4
Build and deploy
- 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”.
