- Who can help me to add Airchat to my website?
- Airchat SDK
- Airchat API (coming soon)
If you have questions, you can always email or skype us(gamanuk_alexander)! If you found a bug feel free to create an issue.
This is a simplified walkthrough to see the platform in action. Register at airchat.us to learn more.
- Register on airchat.us using your Google account.
- Add a JavaScript snippet to your website. Copy the snippet here https://airchat.us/settings/install-pixel.
The Airchat SDK allows you to pass some information about users to Airchat. Add the following JavaScript code before the body tag closing.
<script type='text/javascript' src="https://widget.airchat.us/scripts/sdk.js"></script>
<script>
setTimeout(function () {
airchatSdk.identify('5938104868471', { //EXTERNAL USER ID
customFields: {
'first-name': 'Alexander' //USER FIRST NAME
},
appFields: {
subscription: {
stripe: {
customerId: 'cus_DoI173JzBQyefN' //STRIPE CUSTOMER ID
}
}
}
});
}, 2000);
</script>
Add the https://widget.airchat.us/scripts/sdk.js as to the header.
<script type='text/javascript' src="https://widget.airchat.us/scripts/sdk.js"></script>
Call airchatSdk.identify and pass the external user id from your database as the first parameter.
You can pass any extra information about the uses by adding the customFields field. Usually it's used to add users first name, last name, email, current plan, etc.
Example:
If you're using Stripe API inside your Airchat bots you're required to pass the Stripe Customer ID. To do that you need to add the appFields object to the airchatSdk.identify call.
appFields: {
subscription: {
stripe: {
customerId: 'cus_DoI173JzBQyefN' //STRIPE CUSTOMER ID
}
}
}
See the complete example here.


