Issue
I'm running Microsoft Clarity on a Laravel + Livewire v4 + Flux app. Every internal navigation via wire:navigate seems to end the current Clarity session and start a new one, so a single user visit ends up as a long list of tiny 4–30 second recordings, one per page.
What I see in Clarity's recordings list for one user, all within ~40 minutes:
| Time |
Entry / Exit URL |
Pages |
Duration |
| 00:16 |
/page-a |
1 |
00:00:08 |
| 00:16 |
/page-a |
1 |
00:00:41 |
| 00:17 |
/page-a |
1 |
00:01:35 |
| 00:18 |
/ |
1 |
00:00:07 |
| 00:19 |
/page-b |
1 |
00:00:01 |
| 00:19 |
/page-c |
1 |
00:00:07 |
| 00:19 |
/page-d |
1 |
00:00:04 |
| 00:25 |
/page-c |
1 |
00:00:01 |
| 00:53 |
/ |
1 |
00:00:10 |
| 00:53 |
/page-b |
1 |
00:00:14 |
| 00:53 |
/page-e |
1 |
00:02:50 |
| 00:56 |
/ |
1 |
00:00:04 |
That's one user, one journey, twelve "sessions". I'd really like to watch a user's full journey end-to-end instead of stitching together a dozen short clips.
Setup
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "YOUR_TAG_ID");
</script>
<script>
clarity("identify", "{{ auth()->user()?->email }}", null, "{{ Route::currentRouteName() }}", "{{ auth()->user()?->email }}");
</script>
Both scripts are in <head>.
What I'm asking
Has anyone gotten Clarity to record one continuous session across wire:navigate navigations? If yes, what did you do? Happy to hear any working snippet, workaround, or "we gave up and switched to X" story.
Thanks!