π¬ Add a Website Live Chat Widget with Chakra
Along with WhatsApp, Chakra also enables you to create a Website Live Chat Widget β allowing your customers to chat with you directly from your website or landing page. All chats (website + WhatsApp) appear in the same chat inbox for easy management.
βοΈ How to Set Up the Live Chat Widgetβ
- Go to Admin > Chat Settings > Chat Widget > Customize
- Under the
Customizetab:- π¨ Choose your brand color
- π¬ Set up welcome messages
- π Optionally embed a pre-chat form to collect user info or intent before the chat begins
- Use the demo widget button (bottom right corner) to preview your customizations
- Once you're happy, go to the
Embed Codetab - Copy the embed snippet
- Paste it into the bottom section of your website or landing page (just before
</body>)
β Thatβs it! When you reload your page, youβll see the chat widget live!
π§© Send Custom Data with Chatsβ
You can enrich your live chat with custom structured data (like user IDs, tracking codes, etc.).
Steps:β
-
First, create custom attributes if you havenβt already. π Reference Guide
-
In the
Embed Codetab, find the section:Chat attributes for which data will be sent from the website: -
Select the attributes you want to pre-fill
-
Once selected, the embed code will update to include a
chatDataobject -
Replace
<value>in the snippet with dynamic or static values as needed -
Add this updated snippet to your landing page or website
π― When a chat starts, Chakra will automatically capture and store the configured custom data!
π Track Chat Widget Interactions with Analyticsβ
You can listen to various widget lifecycle events and track them in tools like Google Analytics, Mixpanel, etc.
How to do it:β
-
Go to the
Embed Codetab -
Look for:
Widget events that you want to listen to: -
Select the events you want to track. Available events:
widget:loadπ’ β When the chat button appearswidget:openπ β When a user opens the chat windowwidget:closeβ β When chat window is closedchat:startπ¬ β When a chat beginschat:endπ β When a chat is closedmessage:receiveπ₯ β When your team sends a messagemessage:sendπ€ β When the customer sends a message
-
Once you select the events you want to track, the embed script will automatically update to include event listener hooks for each selected event.
-
Copy this updated embed script and paste it into your website or landing page code. β οΈ Note: The generated functions are just placeholders β they wonβt track anything by default.
-
Youβll need to add your own analytics logic/code inside these handlers to send data to your analytics platform