#Get your script
- Open Brands in the dashboard.
- Select the brand.
- Copy the snippet from the Widget section.
#Add it to your site
Paste the snippet right before the closing </body> tag on every page where the chat should appear.
index.html
<!-- Centdesk widget -->
<script src="https://app.centdesk.io/widget.js" data-brand="YOUR_BRAND_KEY" async></script>#Single-page apps
The script only needs to load once. Route changes in React, Vue or Next.js apps do not require a reload of the widget.
#Content Security Policy
If your site uses a CSP, allow the dashboard domain:
text
script-src https://app.centdesk.io;
connect-src https://app.centdesk.io;