View as Markdown

Satori Integration

Satori is the LiveOps solution from Heroic Labs, designed from inception to seamlessly integrate and work with Nakama. This guide demonstrates interacting with Satori via the Nakama server framework.

Prerequisites #

Getting started #

Learn how to configure and get started using the Satori Client via the Nakama server runtime.

Configuration #

You’ll need to create a Satori API Key for Nakama to use, and also copy the session.signingkey from the Satori configuration.

The Satori server connection details are configured in your Nakama configuration.

Satori client #

The Satori Client connects to your Satori Server and is the entry point to access Satori features. Fetch the Satori client as follows:

Authentication #

Authenticate users with Satori and create a corresponding Satori identity, if one does not exist already. The id used can be the Nakama user ID or any other unique identifier.

Authenticate creates an analytics session by default
Authenticate creates the Satori identity and, by default, also starts a new analytics session. Reading feature flags, experiments, and live events, or updating properties, requires only the identity, never a session. If you use Satori from Nakama for LiveOps configs only, or your game client owns sessions through the Satori client SDK, set the noSession parameter to true (see the function reference). Otherwise each server-side authentication creates a session that competes with your real play sessions, inflating session count and distorting session duration. See Satori sessions for how to choose the right setup.

Properties #

Fetch the associated properties of an identity, and update any of these properties as desired.

Get properties #

To fetch the properties of an identity:

Update properties #

To update the properties of an identity:

When updating an identity’s properties, you can set an optional recompute parameter (set to true in the example above) to re-evaluate this identity’s audience memberships. This is useful if you have changed the properties of an identity and want to immediately update the audience membership.

Events #

Publish one or more events to Satori for a given identity.

Experiments #

You can list all experiments for a given identity, or optionally filter by a specific experiment.

Feature Flags #

You can list all flags for a given identity, or optionally filter by a specific feature flag.

Live Events #

You can list all Live Events for a given identity, or optionally filter by a specific live event.