Reinitialize Hubspot JS


I have a Ruby-on-Rails site with Turbolinks enabled which reloads the HTML BODY on browser page changes and not the HTML HEAD where the hubspot js is located. I'd like to be able to manually reinitialize the hubspot library on any page change, is there an api to do so?


Hi @jindeco,

There isn't an API to reinitialize the HubSpot tracking code, but if you're just trying to track new page views, you can use the page view method of the tracking code API: