InvergeDocs
PythonAPI reference

Sessions

The sessions spine — identify people, start/refresh journey sessions.

// access
client.sessions

The sessions spine — identify people, start/refresh journey sessions.

Events, logs, errors, surveys and replay all correlate into a session, so this is usually the first call a backend makes for a request.

Sessions

class

Extends Resource.

View source

identify()

method
def identify(distinct_id, *, email=None, name=None, phone=None, traits=None) -> Dict[str, Any]

Create or update the person behind distinct_id.

client.sessions.identify("user_123", email="a@b.com", traits={"plan": "pro"})

Parameters

Prop

Type

Returns Dict[str, Any]

View source

track()

method
def track(*, distinct_id=None, email=None, name=None, traits=None, device_key=None, session_key=None, browser=None, app_version=None, country=None, entry_url=None, os_type=None, os_version=None) -> Dict[str, Any]

Start or refresh the active session; returns the server payload (including sessionId).

Omitted identity fields fall back to the ambient nexus.context and then to the client config.

Parameters

Prop

Type

Returns Dict[str, Any]

View source

On this page