From 2fc1e555ed0dd17c8780079bf1315f704570cd02 Mon Sep 17 00:00:00 2001 From: Yurii Horobets Date: Fri, 25 Jul 2025 17:18:04 +0300 Subject: [PATCH] Update GA4.php --- src/GA4.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/GA4.php b/src/GA4.php index b5fe610..1c1eafb 100644 --- a/src/GA4.php +++ b/src/GA4.php @@ -210,6 +210,10 @@ public function sendEvents(array $events): array 'events' => $events, ]; + if (! empty($this->sessionId)) { + $requestData['session_id'] = $this->getSessionId(); + } + if (!empty($this->userId)) { $requestData['user_id'] = $this->userId; }