             url: URL(string: "http://example.com")!.appendingPathComponent(action.joined(separator: "/")),
             actionName: action,
             language: Locale.httpAcceptLanguage,
-            isNewSession: false, // set this to true once we can start a new session
+            isNewSession: nextEventStartsANewSession,
             referer: nil,
             eventCategory: nil,
             eventAction: nil,

        self.queue = queue
        self.dispatcher = dispatcher
        super.init()
        startDispatchTimer()
    }
    

    private(set) var isDispatching = false
    
    
    /// Manually start the dispatching process. You might want to call this method in AppDelegates `applicationDidEnterBackground` to transmit all data
    /// whenever the user leaves the application.
    public func dispatch() {
        guard !isDispatching else { return }
        guard queue.eventCount > 0 else {
