Setup
Client ID
The widget configuration is fetched from our servers for this client.
Controls
Every control calls window.ASTERLIO_API. Initialise the widget first. See the Window API for what each call does.
View & visibility
Show, hide, open and resize the widget.
Position
Move the widget to another corner.
Message composer
Open the chat with a draft waiting in the composer.
First chat & visitor
Identify the visitor with setUser(). Use test data only.
Fields load from getFirstChatFields() once the widget is ready.
Session
Copy, end or restore the visitor's session.
Output
Generated script
Paste this before the closing </body> of the host site.
<script>
var ASTERLIO_API=ASTERLIO_API||{}, ASTERLIO_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://dev-support.asterlio.com/api/asterlio-widget-loader/7mhkiqgntq6ee86l4f4a';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>How it works
Simple integration
Users only need to copy a single script tag with their Client ID as a URL parameter.
Auto-initialisation
The widget initialises automatically when the script loads — no manual init call is needed.
Server-side configuration
Widget settings are managed on our servers and fetched automatically when the widget loads.
Non-blocking loader
The snippet adds the loader as an async script, so it does not hold up the rest of the page.