Hi all, I’m wondering if the below is possible:
I am at a stage of adding user analytics (Segment) into my application. I have typically been forced to use controllers which log user actions on page submits, but now I am considering using Livewire.
I would create a Livewire component called SegmentTrack
for example, and within the controller do the necessary Segment Library calls, however, they would be initiated through on-page user actions such as wire:click="trackClick('Clicked Upload')"
This would allow me to track user actions dynamically via ajax.
My question is - is this possible? I would need some kind of global Livewire instance which is not visible (no frontend) but is accessible across my entire application (and not limited solely to Livewire components).
Not sure but if this is possible it would be super powerful!
Any thoughts? Please let me know!