Website integration overview
Put your Askocto agent on your own website with the embed script or an iframe, then add identity, events, custom actions and tracking.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Website integration is how your agent appears on your own pages. Start with the chat bubble, which needs one script tag. Then add the options you need: greetings, identity, events and actions that run in the browser.
The basics
Every setup begins with the embed script and the agent id:
<script src="https://cdn.askocto.co/embed.js" data-agent-id="agt_123" defer></script>
The script adds a launcher and a global window.askocto object that you can use from your own code.
Pages in this section
Install and display
- Chat bubble: install the launcher and style it.
- Iframe: place the chat inside a page.
- Custom initial messages: set the greeting inside the chat.
- Floating initial messages: invite visitors from next to the bubble.
Control and listen
- Chat interface control: open, close and send messages from your page.
- Chatbot event listeners: react to chat events with
onandoff.
Identity and tracking
- Identity verification: tell the agent who is signed in.
- UTM tracking: keep campaign data with each conversation.
Run code for the agent
- Client-side custom actions: let the agent call functions in the browser.
- Client-side custom forms: show forms the agent can open.
Choosing between bubble and iframe
Use the bubble when help should be available on every page. Use the iframe when the chat belongs in one place, such as a support page. You can use both on the same site.