if (is_null($url)) {
            throw new Exception("Cannot log user activity because no URL was provided");
        }