diff --git a/resources/views/web/release-detail.blade.php b/resources/views/web/release-detail.blade.php index aa32dc70..7ec34e20 100644 --- a/resources/views/web/release-detail.blade.php +++ b/resources/views/web/release-detail.blade.php @@ -213,7 +213,7 @@ {{ $publishedAt->translatedFormat('j. F Y') }} · {{ __('web.detail.time_at', ['time' => $publishedAt->format('H:i')]) }} @endif - {{ __('web.shared.read_time', ['minutes' => $readTime]) }} · {{ __('web.detail.words', ['count' => number_format($wordCount, 0, ',', '.')]) }} + {{ __('web.shared.read_time', ['minutes' => $readTime]) }} · {{ __('web.detail.words', ['count' => number_format($wordCount, 0, ',', '.')]) }}@unless ($isPreview) · {{ __('web.detail.views', ['count' => number_format((int) $release->hits, 0, ',', '.')]) }}@endunless @if ($companyCountry) @@ -279,7 +279,7 @@ {{ $publishedAt->translatedFormat('j. F Y') }} · {{ __('web.detail.time_at', ['time' => $publishedAt->format('H:i')]) }} @endif - {{ __('web.shared.read_time', ['minutes' => $readTime]) }} · {{ __('web.detail.words', ['count' => number_format($wordCount, 0, ',', '.')]) }} + {{ __('web.shared.read_time', ['minutes' => $readTime]) }} · {{ __('web.detail.words', ['count' => number_format($wordCount, 0, ',', '.')]) }}@unless ($isPreview) · {{ __('web.detail.views', ['count' => number_format((int) $release->hits, 0, ',', '.')]) }}@endunless @if ($companyCountry) @@ -462,19 +462,30 @@ url: @js($shareUrl), title: @js($release->title), copied: false, - copy() { navigator.clipboard?.writeText(this.url).then(() => { this.copied = true; setTimeout(() => this.copied = false, 2000); }); } + {{-- Share-Klicks als Ereignis loggen (ohne Personenbezug); in der Vorschau kein Tracking. --}} + trackUrl: @js($isPreview ? null : route('release.share', ['slug' => $release->slug])), + track(channel) { + if (!this.trackUrl) return; + fetch(this.trackUrl, { + method: 'POST', + keepalive: true, + headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': document.querySelector('meta[name=csrf-token]')?.content ?? '' }, + body: JSON.stringify({ channel }) + }).catch(() => {}); + }, + copy() { navigator.clipboard?.writeText(this.url).then(() => { this.copied = true; this.track('copy'); setTimeout(() => this.copied = false, 2000); }); } }">
{{ __('web.detail.share') }}