Last active
December 9, 2024 16:05
-
-
Save cliffordp/1428be81a842d5b93c793d2d5b967007 to your computer and use it in GitHub Desktop.
Automatically open (and keep open) the GoHighLevel chat widget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// For a HighLevel webpage (funnel or website) that is meant to be a dedicated chatting area. | |
// Copy all of this and paste into your custom code, such as in the Footer Tracking area. | |
// This snippet: https://gist.github.com/cliffordp/1428be81a842d5b93c793d2d5b967007 | |
// Source demo: https://10xmarketing.ai/10x-chatbot-widget | |
function openChatWidget() { | |
// Check if Chat Widget exists. | |
if (window.leadConnector && window.leadConnector.chatWidget) { | |
// If it exists, open it. | |
window.leadConnector.chatWidget.openWidget(); | |
//clearInterval(intervalId); // Stop the loop | |
} | |
} | |
// Keep it open by re-opening it (if necessary) every 1000 milliseconds (1 second). | |
var intervalId = setInterval(openChatWidget, 1000); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment