You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're testing out the new Turbo 8 refresh feature, which is a great new addition!
One issue we're facing is that we have quite a few Stimulus controllers which react to eg. turbo:load events and we'd like to be able to differentiate between a refresh (eg. which triggered via a Turbo stream) and a normal visit triggered by a user action.
An example could be an analytics controller which tracks page views like <body .. data-action="turbo:load@window->analytics#trackPageView">. When a page is refreshed and morphed, we do not want to track a page view, as the action was not triggered by a user interaction.
Inspecting the event details received in turbo:load doesn't really provide is any granularity about the visit that triggered that action.
Any ideas or suggestions?
The text was updated successfully, but these errors were encountered:
We're testing out the new Turbo 8 refresh feature, which is a great new addition!
One issue we're facing is that we have quite a few Stimulus controllers which react to eg.
turbo:load
events and we'd like to be able to differentiate between a refresh (eg. which triggered via a Turbo stream) and a normal visit triggered by a user action.An example could be an
analytics
controller which tracks page views like<body .. data-action="turbo:load@window->analytics#trackPageView">
. When a page is refreshed and morphed, we do not want to track a page view, as the action was not triggered by a user interaction.Inspecting the event details received in
turbo:load
doesn't really provide is any granularity about thevisit
that triggered that action.Any ideas or suggestions?
The text was updated successfully, but these errors were encountered: