Turbolinks is a gem for adding single-page application performance to a standard Rails application, without resorting to a complex client-side framework to handle the loading of content.
If you intend to use our support widget on every page of your site, adding it to your app's layout is the easiest way to get up and running. Simply create your widget, copy the embed code, and paste it into the appropriate layout. You can follow the instructions here for more information.
However, if you only load the widget on certain pages, Turbolinks will attempt to reload the widget's embed code on the appropriate pages. Using the standard widget embed code will not work on some browsers. To properly support Turbolinks' hot-swapping of content, you need to make a few modifications to the widget's embed code.
First, take note of the widget id, as you will need to insert this in the new code.
Next, copy and paste this alternative code into the views you wish to load the widget on:
Finally replace the widget id placeholder
INSERT YOUR WIDGET ID HERE with the original id you made note of earlier. If you forget to modify this id, your widget will not work.
With this modified embed code, Turbolinks will load and unload the Groove support widget as pages are hot-swapped in your application.