Embed guide
Add the chatbot to your website using a copy-paste snippet.
Before you embed
- Ensure your site is verified.
- Create or select an API key in the embed generator.
Embed steps
- Open the embed generator and create or select an active API key.
- Generate the snippet that fits your deployment mode.
- Paste it into your website (typically before
</body>). - Publish your site changes.
Common platforms
Use your platform’s standard “add to HTML” method to place the snippet in your page template or footer area.
Embed modes
Standard
<script src="https://realdata.nz/embed.js"></script>
<script>
RealData.init({ apiKey: "rd_xxx", position: "bottom-right" });
</script>
CSP
<div data-realdata-widget data-api-key="rd_xxx" data-position="bottom-right"></div> <script src="https://realdata.nz/embed.js" defer></script>
Iframe
<script src="https://realdata.nz/embed.js"></script>
<script>
RealData.init({
apiKey: "rd_xxx",
position: "bottom-right",
useIframe: true,
iframeSrc: "https://realdata.nz/app/embed-test/"
});
</script>
Troubleshooting
- Widget not visible: check that the snippet is present on the page.
- Console errors: ensure the snippet was not modified.
- Caching: hard refresh or purge cache.