Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shivaprakash's avatar

tawk.to(chat tool) integration to laravel project

Hey Guys i've been learning laravel for the past 3 weeks.I have made a website with a login page and search bar. Now the next step i have been facing issues with adding the chat widget tawk.to to my project. https://www.tawk.to/

Anybody done this before can help me out . I cannot find much information specific to this online. I tried following a tutorial. Link below https://github.com/emotality/tawk-laravel but my website does not reflect any changes.

I would love to hear from You guys. What i like from tawk.to is that it is free and i get notified if a visitor sends the message through the mobile app. I really like the smooth interface

0 likes
5 replies
mvd's avatar
mvd
Best Answer
Level 48

Hi @shivaprakash

Can you see the Tawk.to code in your browser source code?

Another option is to past the snippet widget code from Tawk.to in your master blade template just before the closing body tag (offcourse replace xxxxx with your id).

<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/xxxxxxxxxxxxx/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->
</body>
</html>

If this is not working, check your browser console for javascript errors

1 like
shivaprakash's avatar

@MVD - hey thanks for the timely love and support . I just figured that i had added the code in my app.blade file . All i had to do was add {{ TawkTo::widgetCode() }} in my main.blade and now i see tawk.to in my website. This is great!!! the remaining steps i followed from https://github.com/emotality/tawk-laravel

Please or to participate in this conversation.