Chatbot js call should be loaded on some click event and not on page load

we have a requirement that chatbot code should not get executed on page load .
There should be a dummy chatbot image . when user click on image the chatbot js call should be fired and chatbot should be loaded . As very few visitor are using chatbot so we don’t want to load chatbot code for each and every visitor . Is it possible to implement this ?