Rails 4 + Turbolinks app don't load hubspots client interface, but hard refresh is working


#1

I have a rails 4 application with Turbolinks in it and I have configured Turbolinks for hubspots which will load in each page load event (note that, I have add a debugging code which is firing in each page load, so GTM is working). And I can see the hubspots script tag in my body as well as, in network tab it is doing a proper network call.

PROBLEM

  • When I refresh a page manually (hard refresh/reload) hubspot client interface (chat bubble window) shows up
  • when I visit page with Turbolinks, those network call in network tab and hubspot script tag in document tag persists, but that chat bubble window don't show up.

How to solve this problem?

UPDATE

  • Any solution for Single Page Applications (like react, angular, vuejs) are also helpful.
  • Turbolinks is making my application act like SinglePageApplication and I think that is the problem here.

#2

Hi @Shivraj_Badu,

Can you give me a link to an example page so that I can test this out?