From c977fd6644adf73ff714d11f81f71fdb45749f78 Mon Sep 17 00:00:00 2001 From: Robert Kummer Date: Thu, 15 Jan 2015 15:53:47 +0100 Subject: [PATCH] active forget about the session content --- src/Ipunkt/LaravelAnalytics/TrackingBag.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Ipunkt/LaravelAnalytics/TrackingBag.php b/src/Ipunkt/LaravelAnalytics/TrackingBag.php index 1ce30cf..2806ea6 100644 --- a/src/Ipunkt/LaravelAnalytics/TrackingBag.php +++ b/src/Ipunkt/LaravelAnalytics/TrackingBag.php @@ -39,7 +39,12 @@ public function add($tracking) public function get() { if (Session::has($this->sessionIdentifier)) { - return Session::get($this->sessionIdentifier); + $trackings = Session::get($this->sessionIdentifier); + + // forget the session store data + Session::forget($this->sessionIdentifier); + + return $trackings; } return [];