Closed wrozka closed 3 years ago
Any update when this feature will be available in rack-tracker?
@karthikkasturi thanks for the reminder.
@wrozka @karthikkasturi are you able to test this revision against a production setup?
@DonSchado Yes, we're using this on production
This PR adds support for the new
turbo-rails
gem that supersedesturbolinks
. It observes both turbo and turbolinks events.Also, this PR fixes issue with multiple event listeners tracking stale events and duplicate page views. Since turbo (and turbolinks) are evaluating new scripts from the
head
element, it ends up registering a duplicate event listener any time a new event is pushed from the backend. This PR fixes that by generating a static script with the turbo event listener (it will be evaluated only once) and a dynamic script with backend events (its going be evaluated on every load if any events are present).