Add your agent to a Wix site
Install the Askocto chat widget on a Wix site by adding the embed script as site-wide custom code, then publish and test the widget.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
This page shows how to add your agent's chat bubble to a Wix site. You paste one script as custom code that applies to all pages and publish the site.
Before you start
- An agent with the Website widget turned on. See Channels.
- Permission to edit and publish the Wix site.
- The agent ID from Channels > Website widget > Install.
Add the script
- In Askocto, open the agent, select Channels > Website widget and choose Install.
- Copy the embed script.
<script src="https://cdn.askocto.co/embed.js" data-agent-id="agt_123" defer></script>
- In your Wix site, add the script as custom code, apply it to all pages and place it at the end of the body.
- Publish the site.
You should see the chat bubble on your published site.
Make the bubble fit your site
Colors, the avatar and the greeting are set in Askocto. Open Channels > Website widget to change them. The change reaches your site on the next page load, with no new publish in Wix.
If you want the bubble to open from your own button, call the JavaScript API from your page code.
window.askocto.open();
For more control, see Chat interface control.
Capture leads
Turn on Collect leads to ask visitors for their name and email when they want a quote or a call back. Leads appear in Contacts, and the lead browser event fires on your page, so you can track it in your analytics.
Test it
- Open the published site in a private window.
- Ask a question and read the answer.
- Compare with the same question in Test > Playground. See Playground.
Remove the widget
Remove the script from the site's custom code and publish again.
Troubleshooting
- No bubble on the live site. Confirm the site was published after adding the code.
- The bubble is missing on some pages. Set the code to apply to all pages.
- The bubble loads the wrong agent. Check
data-agent-idagainst the agent's ID.