To embed the widget into your website, simply paste the provided code, which should look like this:
<script src="https://chatbot.funnelleasing.com/funnel-chat.min.js"></script>
<script>
window.addEventListener('load', function () {
FunnelChat.initialize({
apiKey: "FUNNEL_API_KEY_HERE",
communityId: FUNNEL_COMMUNITY_ID_HERE,
timeout: 00,
leadSourceId: LEAD_SOURCE_ID_HERE,
defaultPaddingRight: '10px',
defaultPaddingBottom: '10px',
reactivePaddingRight: '20px',
reactivePaddingBottom: '40px'
})
})
</script>
FunnelChat.initialize
The chat can be initialized by calling the initialize function. There are both required and optional parameters you can set:
apiKey
- The company API key, this will be provided by Funnel. This is a string and will need to be wrapped in quotes.communityId
- The ID of the Funnel community, this will be provided by Funnel. This is an integer and is not wrapped in quotes.timeout
- A timeout duration in milliseconds. The chat will automatically appear after this duration has passed. This is an integer and is not wrapped in quotes. We recommend a value of 00.leadSourceId
- The ID of the lead source to use for clients created through the chat, this will be provided by Funnel. This is an integer and is not wrapped in quotes.defaultPaddingRight
- By default the chatbot draws in the bottom right hand corner, you can use this to slide it to the left.defaultPaddingBottom
- By default the chatbot draws in the bottom right hand corner, you can use this to slide it upwards.reactivePaddingRight
- If the webpage is being displayed on a screen less than 480px wide this will slide it to the left.reactivePaddingBottom
- If the webpage is being displayed on a screen less than 480px wide this will slide it upwards.FunnelChat.restart
The chat can be restarted by calling the restart function. This function does not take any parameters and a new chat will automatically appear immediately.
Our chatbot widget is also capable integrating with Google Analytics. Documentation outlining this can be found here.