Tawk.to widget not rendering on Next.js homepage but works on other routes

Hi everyone,

I’m running a Next.js website and recently added the tawk.to chat widget. Everything seems to work fine on most pages, but for some reason, the widget doesn’t render on the homepage at all. There are no console errors, and the script is added correctly in the layout file.

The site is: https://star49s.com/ .It’s strange because on internal routes the widget shows instantly after navigation, but the first load of the homepage doesn’t display anything — only after a full reload it appears. I’ve already tried adding the script inside _app.js, _document.js, and even dynamically importing it after hydration, but the issue still exists.

Has anyone experienced this behavior with tawk.to in a Next.js setup? Could it be related to server-side rendering or hydration timing on the first load? Any reliable workaround would be appreciated, especially if someone has it working on a production Next.js site.

Hi,

I wasn’t able to test it as the tawk.to widget has been removed from your website. Our team needs to investigate why this issue occurs only on the first load.

Please note that our widget loads after all website scripts have finished loading, so it doesn’t appear to be related to server-side rendering.

We currently don’t have a guide specifically for Next.js, but you can refer to our React.js article here:
:point_right: Help Center | tawk.to | React.js